llvm.org GIT mirror llvm / da813f4
Fix type-checking for load transformation which is not legal on floating-point types. PR11674. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147323 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Friedman 8 years ago
2 changed file(s) with 16 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1392313923 // shuffle. We need SSE4 for the shuffles.
1392413924 // TODO: It is possible to support ZExt by zeroing the undef values
1392513925 // during the shuffle phase or after the shuffle.
13926 if (RegVT.isVector() && Ext == ISD::EXTLOAD && Subtarget->hasSSE41()) {
13926 if (RegVT.isVector() && RegVT.isInteger() &&
13927 Ext == ISD::EXTLOAD && Subtarget->hasSSE41()) {
1392713928 assert(MemVT != RegVT && "Cannot extend to the same type");
1392813929 assert(MemVT.isVector() && "Must load a vector from memory");
1392913930
0 ; RUN: llc < %s -march=x86 -mattr=+sse41,-avx | FileCheck %s
1
2 ; PR11674
3 define void @fpext_frommem(<2 x float>* %in, <2 x double>* %out) {
4 entry:
5 ; TODO: We should be able to generate cvtps2pd for the load.
6 ; For now, just check that we generate something sane.
7 ; CHECK: cvtss2sd
8 ; CHECK: cvtss2sd
9 %0 = load <2 x float>* %in, align 8
10 %1 = fpext <2 x float> %0 to <2 x double>
11 store <2 x double> %1, <2 x double>* %out, align 1
12 ret void
13 }