[llvm] r247774 - [NaryReassociate] Improve test CHECK

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 15 22:27:47 PDT 2015


Author: mehdi_amini
Date: Wed Sep 16 00:27:46 2015
New Revision: 247774

URL: http://llvm.org/viewvc/llvm-project?rev=247774&view=rev
Log:
[NaryReassociate] Improve test CHECK

Add `CHECK` directives for the function calls.

Differential Revision: http://reviews.llvm.org/D12885

Patch by: Volkan Keles <vkeles at apple.com>

From: Mehdi Amini <mehdi.amini at apple.com>

Modified:
    llvm/trunk/test/Transforms/NaryReassociate/nary-add.ll
    llvm/trunk/test/Transforms/NaryReassociate/nary-mul.ll

Modified: llvm/trunk/test/Transforms/NaryReassociate/nary-add.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/NaryReassociate/nary-add.ll?rev=247774&r1=247773&r2=247774&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/NaryReassociate/nary-add.ll (original)
+++ llvm/trunk/test/Transforms/NaryReassociate/nary-add.ll Wed Sep 16 00:27:46 2015
@@ -17,8 +17,9 @@ define void @left_reassociate(i32 %a, i3
   call void @foo(i32 %1)
   %2 = add i32 %b, %c
   %3 = add i32 %a, %2
-; CHECK: add i32 [[BASE]], %b
+; CHECK: [[RESULT:%[a-zA-Z0-9]+]] = add i32 [[BASE]], %b
   call void @foo(i32 %3)
+; CHECK-NEXT: call void @foo(i32 [[RESULT]])
   ret void
 }
 
@@ -35,8 +36,9 @@ define void @right_reassociate(i32 %a, i
   call void @foo(i32 %1)
   %2 = add i32 %a, %b
   %3 = add i32 %2, %c
-; CHECK: add i32 [[BASE]], %b
+; CHECK: [[RESULT:%[a-zA-Z0-9]+]] = add i32 [[BASE]], %b
   call void @foo(i32 %3)
+; CHECK-NEXT: call void @foo(i32 [[RESULT]])
   ret void
 }
 

Modified: llvm/trunk/test/Transforms/NaryReassociate/nary-mul.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/NaryReassociate/nary-mul.ll?rev=247774&r1=247773&r2=247774&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/NaryReassociate/nary-mul.ll (original)
+++ llvm/trunk/test/Transforms/NaryReassociate/nary-mul.ll Wed Sep 16 00:27:46 2015
@@ -11,8 +11,9 @@ define void @bar(i32 %a, i32 %b, i32 %c)
   call void @foo(i32 %1)
   %2 = mul i32 %a, %b
   %3 = mul i32 %2, %c
-; CHECK: mul i32 [[BASE]], %b
+; CHECK: [[RESULT:%[a-zA-Z0-9]+]] = mul i32 [[BASE]], %b
   call void @foo(i32 %3)
+; CHECK-NEXT: call void @foo(i32 [[RESULT]])
   ret void
 }
 




More information about the llvm-commits mailing list