mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
[X86][SSE] Bitcast assertion in XFormVExtractWithShuffleIntoLoad
Minor patch to fix an issue in XFormVExtractWithShuffleIntoLoad where a load is unary shuffled, then bitcast (to a type with the same number of elements) before extracting an element. An undef was created for the second shuffle operand using the original (post-bitcasted) vector type instead of the pre-bitcasted type like the rest of the shuffle node - this was then causing an assertion on the different types later on inside SelectionDAG::getVectorShuffle. Differential Revision: http://reviews.llvm.org/D5917 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -46,3 +46,19 @@ bb:
|
||||
store double %.sroa.3.24.vec.extract, double* undef, align 8
|
||||
unreachable
|
||||
}
|
||||
|
||||
; Case where a load is unary shuffled, then bitcast (to a type with the same
|
||||
; number of elements) before extractelement.
|
||||
; This is testing for an assertion - the extraction was assuming that the undef
|
||||
; second shuffle operand was a post-bitcast type instead of a pre-bitcast type.
|
||||
define i64 @t4(<2 x double>* %a) {
|
||||
; CHECK-LABEL: t4:
|
||||
; CHECK: mov
|
||||
; CHECK: ret
|
||||
%b = load <2 x double>* %a, align 16
|
||||
%c = shufflevector <2 x double> %b, <2 x double> %b, <2 x i32> <i32 1, i32 0>
|
||||
%d = bitcast <2 x double> %c to <2 x i64>
|
||||
%e = extractelement <2 x i64> %d, i32 1
|
||||
ret i64 %e
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user