Skip to content

Commit ebf3de7

Browse files
committed
[InstCombine] Add more tests. NFC.
1 parent 74f0229 commit ebf3de7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/test/Transforms/InstCombine/icmp-shl-nuw.ll

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,16 @@ define i1 @fold_icmp_shl_nuw_c2_div_non_pow2(i32 %x) {
134134
ret i1 %cmp
135135
}
136136

137+
define i1 @fold_icmp_shl_nuw_c3(i32 %x) {
138+
; CHECK-LABEL: @fold_icmp_shl_nuw_c3(
139+
; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i32 [[X:%.*]], 1
140+
; CHECK-NEXT: ret i1 [[CMP]]
141+
;
142+
%shl = shl nuw i32 48, %x
143+
%cmp = icmp uge i32 %shl, 144
144+
ret i1 %cmp
145+
}
146+
137147
; Negative tests
138148

139149
define i1 @fold_icmp_shl_nuw_c2_indivisible(i32 %x) {

0 commit comments

Comments
 (0)