1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

merge sext-2 into sext.ll

llvm-svn: 90293
This commit is contained in:
Chris Lattner 2009-12-02 05:34:35 +00:00
parent 3781027d07
commit 2d3554c3d9
2 changed files with 12 additions and 14 deletions

View File

@ -1,14 +0,0 @@
; Checks to see that instcombine can handle a sign extension of i1
; RUN: opt < %s -instcombine -S | FileCheck %s
define void @test(<2 x i16> %srcA, <2 x i16> %srcB, <2 x i16>* %dst) nounwind {
entry:
; CHECK-NOT: tmask
; CHECK: ret
%cmp = icmp eq <2 x i16> %srcB, %srcA;
%sext = sext <2 x i1> %cmp to <2 x i16>;
%tmask = ashr <2 x i16> %sext, <i16 15, i16 15> ;
store <2 x i16> %tmask, <2 x i16>* %dst;
ret void
}

View File

@ -114,3 +114,15 @@ entry:
; CHECK-NEXT: ret i32
}
define void @test11(<2 x i16> %srcA, <2 x i16> %srcB, <2 x i16>* %dst) {
%cmp = icmp eq <2 x i16> %srcB, %srcA
%sext = sext <2 x i1> %cmp to <2 x i16>
%tmask = ashr <2 x i16> %sext, <i16 15, i16 15>
store <2 x i16> %tmask, <2 x i16>* %dst
ret void
; CHECK: @test11
; CHECK-NEXT: icmp eq
; CHECK-NEXT: sext <2 x i1>
; CHECK-NEXT: store <2 x i16>
; CHECK-NEXT: ret
}