[NaryReassociate] Improve test CHECK

Add `CHECK` directives for the function calls.

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

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

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247774 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mehdi Amini 2015-09-16 05:27:46 +00:00
parent cdb417eada
commit ecd56aa518
2 changed files with 6 additions and 3 deletions

View File

@ -17,8 +17,9 @@ define void @left_reassociate(i32 %a, i32 %b, i32 %c) {
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, i32 %b, i32 %c) {
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
}

View File

@ -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
}