Skip to content

Commit 4c9ac9f

Browse files
committed
Implemented code review comments
1 parent 9c2ca90 commit 4c9ac9f

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,25 @@
11
; REQUIRES: asserts
22
; RUN: opt -passes=slsr,gvn -S -debug-counter=slsr-counter=1 < %s | FileCheck %s
33

4-
;; Test that, with debug counters on, we will skip the first slsr opportunity.
4+
; Test that, with debug counters on, we will skip the first slsr opportunity.
55

66
define void @stride_is_2s(i32 %b, i32 %s) {
77
; CHECK-LABEL: @stride_is_2s(
8-
; CHECK-NEXT: %s2 = shl i32 %s, 1
9-
; CHECK-NEXT: %t1 = add i32 %b, %s2
10-
; CHECK-NEXT: call void @foo(i32 %t1)
11-
; CHECK-NEXT: %t2 = add i32 %t1, %s2
12-
; CHECK-NEXT: call void @foo(i32 %t2)
13-
; CHECK-NEXT: %s6 = mul i32 %s, 6
14-
; CHECK-NEXT: %t3 = add i32 %b, %s6
15-
; CHECK-NEXT: call void @foo(i32 %t3)
16-
; CHECK-NEXT: ret void
8+
; CHECK-NEXT: %s2 = shl i32 %s, 1
9+
; CHECK-NEXT: %t1 = add i32 %b, %s2
10+
; CHECK-NEXT: call void @foo(i32 %t1)
11+
; CHECK-NEXT: %s4 = shl i32 %s, 2
12+
; CHECK-NEXT: %t2 = add i32 %b, %s4
13+
; CHECK-NEXT: call void @foo(i32 %t2)
14+
; CHECK-NEXT: ret void
1715
;
1816
%s2 = shl i32 %s, 1
1917
%t1 = add i32 %b, %s2
2018
call void @foo(i32 %t1)
2119
%s4 = shl i32 %s, 2
2220
%t2 = add i32 %b, %s4
2321
call void @foo(i32 %t2)
24-
%s6 = mul i32 %s, 6
25-
%t3 = add i32 %b, %s6
26-
call void @foo(i32 %t3)
2722
ret void
2823
}
2924

30-
declare void @foo(i32)
25+
declare void @foo(i32)

0 commit comments

Comments
 (0)