[InstSimplify] Teach InstSimplify how to simplify extractelement

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer
2015-07-13 01:15:53 +00:00
parent 5501985a58
commit 46b13dd880
7 changed files with 142 additions and 58 deletions
+14
View File
@@ -265,3 +265,17 @@ define i32 @test34(i32 %a) {
%b = lshr i32 undef, 0
ret i32 %b
}
; CHECK-LABEL: @test35
; CHECK: ret i32 undef
define i32 @test35(<4 x i32> %V) {
%b = extractelement <4 x i32> %V, i32 4
ret i32 %b
}
; CHECK-LABEL: @test36
; CHECK: ret i32 undef
define i32 @test36(i32 %V) {
%b = extractelement <4 x i32> undef, i32 %V
ret i32 %b
}