[llvm] r346334 - Workaround PPC backend bug in test for r346322.

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 7 09:01:48 PST 2018


Author: jyknight
Date: Wed Nov  7 09:01:47 2018
New Revision: 346334

URL: http://llvm.org/viewvc/llvm-project?rev=346334&view=rev
Log:
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.

Modified:
    llvm/trunk/test/CodeGen/Generic/is-constant.ll

Modified: llvm/trunk/test/CodeGen/Generic/is-constant.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/Generic/is-constant.ll?rev=346334&r1=346333&r2=346334&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/Generic/is-constant.ll (original)
+++ llvm/trunk/test/CodeGen/Generic/is-constant.ll Wed Nov  7 09:01:47 2018
@@ -11,7 +11,7 @@ declare i1 @llvm.is.constant.i256(i256 %
 declare i1 @llvm.is.constant.v2i64(<2 x i64> %a)
 declare i1 @llvm.is.constant.f32(float %a)
 declare i1 @llvm.is.constant.sl_i32i32s({i32, i32} %a)
-declare i1 @llvm.is.constant.a2i32([2 x i32] %a)
+declare i1 @llvm.is.constant.a2i64([2 x i64] %a)
 declare i1 @llvm.is.constant.p0i64(i64* %a)
 
 ;; Basic test that optimization folds away the is.constant when given
@@ -63,7 +63,7 @@ define i1 @test_diff() #0 {
   ret i1 %ret
 }
 
-define i1 @test_various_types(i256 %int, float %float, <2 x i64> %vec, {i32, i32} %struct, [2 x i32] %arr, i64* %ptr) #0 {
+define i1 @test_various_types(i256 %int, float %float, <2 x i64> %vec, {i32, i32} %struct, [2 x i64] %arr, i64* %ptr) #0 {
 ; CHECK-LABEL: @test_various_types(
 ; CHECK: llvm.is.constant
 ; CHECK: llvm.is.constant
@@ -76,14 +76,14 @@ define i1 @test_various_types(i256 %int,
   %v2 = call i1 @llvm.is.constant.f32(float %float)
   %v3 = call i1 @llvm.is.constant.v2i64(<2 x i64> %vec)
   %v4 = call i1 @llvm.is.constant.sl_i32i32s({i32, i32} %struct)
-  %v5 = call i1 @llvm.is.constant.a2i32([2 x i32] %arr)
+  %v5 = call i1 @llvm.is.constant.a2i64([2 x i64] %arr)
   %v6 = call i1 @llvm.is.constant.p0i64(i64* %ptr)
 
   %c1 = call i1 @llvm.is.constant.i256(i256 -1)
   %c2 = call i1 @llvm.is.constant.f32(float 17.0)
   %c3 = call i1 @llvm.is.constant.v2i64(<2 x i64> <i64 -1, i64 44>)
   %c4 = call i1 @llvm.is.constant.sl_i32i32s({i32, i32} {i32 -1, i32 32})
-  %c5 = call i1 @llvm.is.constant.a2i32([2 x i32] [i32 -1, i32 32])
+  %c5 = call i1 @llvm.is.constant.a2i64([2 x i64] [i64 -1, i64 32])
   %c6 = call i1 @llvm.is.constant.p0i64(i64* inttoptr (i32 42 to i64*))
 
   %x1 = add i1 %v1, %c1
@@ -106,7 +106,7 @@ define i1 @test_various_types2() #0 {
 ; CHECK-LABEL: @test_various_types2(
 ; CHECK: ret i1 false
   %r = call i1 @test_various_types(i256 -1, float 22.0, <2 x i64> <i64 -1, i64 44>,
-                     {i32, i32} {i32 -1, i32 55}, [2 x i32] [i32 -1, i32 55],
+                     {i32, i32} {i32 -1, i32 55}, [2 x i64] [i64 -1, i64 55],
 		     i64* inttoptr (i64 42 to i64*))
   ret i1 %r
 }




More information about the llvm-commits mailing list