Skip to content

Commit aeff03d

Browse files
committed
[InstCombine] Regenerate 2010-11-23-Distributed.ll tests
1 parent 1819222 commit aeff03d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
12
; RUN: opt < %s -instcombine -S | FileCheck %s
3+
24
define i32 @foo(i32 %x, i32 %y) {
35
; CHECK-LABEL: @foo(
6+
; CHECK-NEXT: [[RES:%.*]] = mul i32 [[X:%.*]], [[Y:%.*]]
7+
; CHECK-NEXT: ret i32 [[RES]]
8+
;
49
%add = add nsw i32 %y, %x
510
%mul = mul nsw i32 %add, %y
611
%square = mul nsw i32 %y, %y
712
%res = sub i32 %mul, %square
813
ret i32 %res
9-
; CHECK-NEXT: mul i32 %x, %y
10-
; CHECK-NEXT: ret i32
1114
}
1215

1316
define i1 @bar(i64 %x, i64 %y) {
1417
; CHECK-LABEL: @bar(
18+
; CHECK-NEXT: [[TMP1:%.*]] = xor i64 [[X:%.*]], -1
19+
; CHECK-NEXT: [[B:%.*]] = and i64 [[TMP1]], [[Y:%.*]]
20+
; CHECK-NEXT: [[R:%.*]] = icmp eq i64 [[B]], 0
21+
; CHECK-NEXT: ret i1 [[R]]
22+
;
1523
%a = and i64 %y, %x
16-
; CHECK: and
17-
; CHECK-NOT: and
1824
%not = xor i64 %a, -1
1925
%b = and i64 %y, %not
2026
%r = icmp eq i64 %b, 0
2127
ret i1 %r
22-
; CHECK: ret i1
2328
}

0 commit comments

Comments
 (0)