mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-31 09:32:11 +00:00
merge sext-2 into sext.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8bdcb25072
commit
edc436bbf4
@ -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
|
||||
}
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user