Skip to content

Commit

Permalink
crux-llvm: Fix test suite with Clang 12
Browse files Browse the repository at this point in the history
Fixing `T847-fail2` is as simple as accepting the new output resulting from
#914.

Fixing `invoke-test` requires updating the LLVM to use `sret` syntax specific
to LLVM 12 or later. (See
https://releases.llvm.org/12.0.0/docs/LangRef.html#parameter-attributes).
As a result, this test is now only ran on Clang 12 or later.

Fixes #977.
  • Loading branch information
RyanGlScott committed May 9, 2022
1 parent e3643e4 commit 22a4adb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@
[Crux] The LLVM language reference, version 12
[Crux] ‘llvm.abs.*’ Intrinsic (Semantics)
[Crux] Document URL: https://releases.llvm.org/12.0.0/docs/LangRef.html
[Crux] in context:
[Crux] my_abs
[Crux] main
[Crux] Overall status: Invalid.
4 changes: 2 additions & 2 deletions crux-llvm/test-data/golden/golden/invoke-test.ll
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bb2: ; preds = %bb1

; core::fmt::Arguments::new_v1_formatted
; Function Attrs: inlinehint uwtable
define internal void @_ZN4core3fmt9Arguments16new_v1_formatted17hd5e9ced080c81dfaE(%"core::fmt::Arguments"* noalias nocapture sret dereferenceable(48), [0 x { [0 x i8]*, i64 }]* noalias nonnull readonly align 8 %pieces.0, i64 %pieces.1, [0 x { i8*, i8* }]* noalias nonnull readonly align 8 %args.0, i64 %args.1, [0 x %"core::fmt::rt::v1::Argument"]* noalias nonnull readonly align 8 %fmt.0, i64 %fmt.1) unnamed_addr #1 {
define internal void @_ZN4core3fmt9Arguments16new_v1_formatted17hd5e9ced080c81dfaE(%"core::fmt::Arguments"* noalias nocapture sret(%"core::fmt::Arguments") dereferenceable(48), [0 x { [0 x i8]*, i64 }]* noalias nonnull readonly align 8 %pieces.0, i64 %pieces.1, [0 x { i8*, i8* }]* noalias nonnull readonly align 8 %args.0, i64 %args.1, [0 x %"core::fmt::rt::v1::Argument"]* noalias nonnull readonly align 8 %fmt.0, i64 %fmt.1) unnamed_addr #1 {
start:
%_5 = alloca { i64*, i64 }, align 8
%1 = bitcast { i64*, i64 }* %_5 to { [0 x %"core::fmt::rt::v1::Argument"]*, i64 }*
Expand Down Expand Up @@ -926,7 +926,7 @@ bb4: ; preds = %bb3
store i8* %10, i8** %13, align 8
%14 = bitcast [1 x { i8*, i8* }]* %_16 to [0 x { i8*, i8* }]*
; call core::fmt::Arguments::new_v1_formatted
call void @_ZN4core3fmt9Arguments16new_v1_formatted17hd5e9ced080c81dfaE(%"core::fmt::Arguments"* noalias nocapture sret dereferenceable(48) %_9, [0 x { [0 x i8]*, i64 }]* noalias nonnull readonly align 8 bitcast (<{ i8*, [8 x i8], i8*, [8 x i8] }>* @2 to [0 x { [0 x i8]*, i64 }]*), i64 2, [0 x { i8*, i8* }]* noalias nonnull readonly align 8 %14, i64 1, [0 x %"core::fmt::rt::v1::Argument"]* noalias nonnull readonly align 8 bitcast (<{ [64 x i8] }>* @3 to [0 x %"core::fmt::rt::v1::Argument"]*), i64 1)
call void @_ZN4core3fmt9Arguments16new_v1_formatted17hd5e9ced080c81dfaE(%"core::fmt::Arguments"* noalias nocapture sret(%"core::fmt::Arguments") dereferenceable(48) %_9, [0 x { [0 x i8]*, i64 }]* noalias nonnull readonly align 8 bitcast (<{ i8*, [8 x i8], i8*, [8 x i8] }>* @2 to [0 x { [0 x i8]*, i64 }]*), i64 2, [0 x { i8*, i8* }]* noalias nonnull readonly align 8 %14, i64 1, [0 x %"core::fmt::rt::v1::Argument"]* noalias nonnull readonly align 8 bitcast (<{ [64 x i8] }>* @3 to [0 x %"core::fmt::rt::v1::Argument"]*), i64 1)
br label %bb5

bb5: ; preds = %bb4
Expand Down

0 comments on commit 22a4adb

Please sign in to comment.