mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[InstCombine] add test for PR30327
llvm-svn: 281248
This commit is contained in:
parent
d04728ea07
commit
7d186b422a
@ -1,5 +1,6 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||
|
||||
; rdar://11748024
|
||||
|
||||
define i32 @a(i1 zeroext %x, i1 zeroext %y) {
|
||||
@ -17,3 +18,16 @@ define i32 @a(i1 zeroext %x, i1 zeroext %y) {
|
||||
ret i32 %add
|
||||
}
|
||||
|
||||
define i32 @PR30273(i1 %a, i1 %b) {
|
||||
; CHECK-LABEL: @PR30273(
|
||||
; CHECK-NEXT: [[ZEXT:%.*]] = zext i1 %a to i32
|
||||
; CHECK-NEXT: [[SEL1:%.*]] = select i1 %a, i32 2, i32 1
|
||||
; CHECK-NEXT: [[SEL2:%.*]] = select i1 %b, i32 [[SEL1]], i32 [[ZEXT]]
|
||||
; CHECK-NEXT: ret i32 [[SEL2]]
|
||||
;
|
||||
%zext = zext i1 %a to i32
|
||||
%sel1 = select i1 %a, i32 2, i32 1
|
||||
%sel2 = select i1 %b, i32 %sel1, i32 %zext
|
||||
ret i32 %sel2
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user