mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Rename ValueRequiresCast to ShouldOptimizeCast, to better reflect
what it does. Enhance it to return false to optimizing vector sign extensions from vector comparisions, which is the idiom used to get a splatted vector for a vector comparison. Doing this breaks vector-casts.ll, add some compensating transformations to handle the important case they cover without depending on this canonicalization. This fixes rdar://7434900 a serious pessimization of vector compares. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95855 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,6 +51,22 @@ entry:
|
||||
}
|
||||
|
||||
|
||||
; rdar://7434900
|
||||
define <2 x i64> @test5(<4 x float> %a, <4 x float> %b) nounwind readnone {
|
||||
entry:
|
||||
%cmp = fcmp ult <4 x float> %a, zeroinitializer
|
||||
%sext = sext <4 x i1> %cmp to <4 x i32>
|
||||
%cmp4 = fcmp ult <4 x float> %b, zeroinitializer
|
||||
%sext5 = sext <4 x i1> %cmp4 to <4 x i32>
|
||||
%and = and <4 x i32> %sext, %sext5
|
||||
%conv = bitcast <4 x i32> %and to <2 x i64>
|
||||
ret <2 x i64> %conv
|
||||
|
||||
; CHECK: @test5
|
||||
; CHECK: sext <4 x i1> %cmp to <4 x i32>
|
||||
; CHECK: sext <4 x i1> %cmp4 to <4 x i32>
|
||||
}
|
||||
|
||||
|
||||
define void @convert(<2 x i32>* %dst.addr, <2 x i64> %src) nounwind {
|
||||
entry:
|
||||
|
Reference in New Issue
Block a user