mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-20 19:25:05 +00:00
[InstCombine] add test for demanded bits with splat vector constants; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3af2f3b521
commit
4dc55bcb30
@ -382,6 +382,19 @@ define i32 @test31(i1 %X) {
|
||||
ret i32 %A
|
||||
}
|
||||
|
||||
; FIXME: Demanded bit analysis allows us to eliminate the add.
|
||||
|
||||
define <2 x i32> @and_demanded_bits_splat_vec(<2 x i32> %x) {
|
||||
; CHECK-LABEL: @and_demanded_bits_splat_vec(
|
||||
; CHECK-NEXT: [[Y:%.*]] = add <2 x i32> %x, <i32 8, i32 8>
|
||||
; CHECK-NEXT: [[Z:%.*]] = and <2 x i32> [[Y]], <i32 7, i32 7>
|
||||
; CHECK-NEXT: ret <2 x i32> [[Z]]
|
||||
;
|
||||
%y = add <2 x i32> %x, <i32 8, i32 8>
|
||||
%z = and <2 x i32> %y, <i32 7, i32 7>
|
||||
ret <2 x i32> %z
|
||||
}
|
||||
|
||||
define i32 @test32(i32 %In) {
|
||||
; CHECK-LABEL: @test32(
|
||||
; CHECK-NEXT: ret i32 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user