llvm.org GIT mirror llvm / bf862d6
Workaround PPC backend bug in test for r346322. It seems that the PPC backend croaks when lowering a call to a function with an argument of type [2 x i32]. Just modify the type slightly to avoid this -- I wasn't actually intending to stress test the backend... llvm/lib/Target/PowerPC/PPCISelLowering.cpp:6172: llvm::SDValue llvm::PPCTargetLowering::LowerCall_64SVR4(...): Assertion `(!HasParameterArea || NumBytesActuallyUsed == ArgOffset) && "mismatch in size of parameter area"' failed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346334 91177308-0d34-0410-b5e6-96231b3b80d8 James Y Knight 2 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
1010 declare i1 @llvm.is.constant.v2i64(<2 x i64> %a)
1111 declare i1 @llvm.is.constant.f32(float %a)
1212 declare i1 @llvm.is.constant.sl_i32i32s({i32, i32} %a)
13 declare i1 @llvm.is.constant.a2i32([2 x i32] %a)
13 declare i1 @llvm.is.constant.a2i64([2 x i64] %a)
1414 declare i1 @llvm.is.constant.p0i64(i64* %a)
1515
1616 ;; Basic test that optimization folds away the is.constant when given
6262 ret i1 %ret
6363 }
6464
65 define i1 @test_various_types(i256 %int, float %float, <2 x i64> %vec, {i32, i32} %struct, [2 x i32] %arr, i64* %ptr) #0 {
65 define i1 @test_various_types(i256 %int, float %float, <2 x i64> %vec, {i32, i32} %struct, [2 x i64] %arr, i64* %ptr) #0 {
6666 ; CHECK-LABEL: @test_various_types(
6767 ; CHECK: llvm.is.constant
6868 ; CHECK: llvm.is.constant
7575 %v2 = call i1 @llvm.is.constant.f32(float %float)
7676 %v3 = call i1 @llvm.is.constant.v2i64(<2 x i64> %vec)
7777 %v4 = call i1 @llvm.is.constant.sl_i32i32s({i32, i32} %struct)
78 %v5 = call i1 @llvm.is.constant.a2i32([2 x i32] %arr)
78 %v5 = call i1 @llvm.is.constant.a2i64([2 x i64] %arr)
7979 %v6 = call i1 @llvm.is.constant.p0i64(i64* %ptr)
8080
8181 %c1 = call i1 @llvm.is.constant.i256(i256 -1)
8282 %c2 = call i1 @llvm.is.constant.f32(float 17.0)
8383 %c3 = call i1 @llvm.is.constant.v2i64(<2 x i64> )
8484 %c4 = call i1 @llvm.is.constant.sl_i32i32s({i32, i32} {i32 -1, i32 32})
85 %c5 = call i1 @llvm.is.constant.a2i32([2 x i32] [i32 -1, i32 32])
85 %c5 = call i1 @llvm.is.constant.a2i64([2 x i64] [i64 -1, i64 32])
8686 %c6 = call i1 @llvm.is.constant.p0i64(i64* inttoptr (i32 42 to i64*))
8787
8888 %x1 = add i1 %v1, %c1
105105 ; CHECK-LABEL: @test_various_types2(
106106 ; CHECK: ret i1 false
107107 %r = call i1 @test_various_types(i256 -1, float 22.0, <2 x i64> ,
108 {i32, i32} {i32 -1, i32 55}, [2 x i32] [i32 -1, i32 55],
108 {i32, i32} {i32 -1, i32 55}, [2 x i64] [i64 -1, i64 55],
109109 i64* inttoptr (i64 42 to i64*))
110110 ret i1 %r
111111 }