Skip to content

Commit 907a751

Browse files
LebedevRItstellar
authored andcommitted
[NFC][InstCombine] Add test for PR49778
(cherry picked from commit 5352490)
1 parent 0cbbf06 commit 907a751

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2+
; RUN: opt < %s -instcombine -S | FileCheck %s
3+
4+
; PR49778: this should not be folded to 0.
5+
define i32 @src(i1 %x2) {
6+
; CHECK-LABEL: @src(
7+
; CHECK-NEXT: ret i32 0
8+
;
9+
%x13 = zext i1 %x2 to i32
10+
%_7 = shl i32 4294967295, %x13
11+
%mask = xor i32 %_7, 4294967295
12+
%_8 = and i32 %mask, %x13
13+
%_9 = shl i32 %_8, %x13
14+
ret i32 %_9
15+
}

0 commit comments

Comments
 (0)