llvm.org GIT mirror llvm / d2ccc92
Merging r245535: ------------------------------------------------------------------------ r245535 | hfinkel | 2015-08-19 20:02:02 -0700 (Wed, 19 Aug 2015) | 6 lines [PowerPC] Fix value type on XVCMPEQDP for v2f64 comparisons XVCMPEQDP is used for VSX v2f64 equality comparisons, but the value type needs to be v2i64 (as that's the corresponding SETCC type). Fixes PR24225. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@245574 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
2 changed file(s) with 44 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
23042304 if (Swap)
23052305 std::swap(LHS, RHS);
23062306
2307 EVT ResVT = VecVT.changeVectorElementTypeToInteger();
23072308 if (Negate) {
2308 SDValue VCmp(CurDAG->getMachineNode(VCmpInst, dl, VecVT, LHS, RHS), 0);
2309 SDValue VCmp(CurDAG->getMachineNode(VCmpInst, dl, ResVT, LHS, RHS), 0);
23092310 return CurDAG->SelectNodeTo(N, PPCSubTarget->hasVSX() ? PPC::XXLNOR :
23102311 PPC::VNOR,
2311 VecVT, VCmp, VCmp);
2312 }
2313
2314 return CurDAG->SelectNodeTo(N, VCmpInst, VecVT, LHS, RHS);
2312 ResVT, VCmp, VCmp);
2313 }
2314
2315 return CurDAG->SelectNodeTo(N, VCmpInst, ResVT, LHS, RHS);
23152316 }
23162317
23172318 if (PPCSubTarget->useCRBits())
0 ; RUN: llc < %s | FileCheck %s
1 target datalayout = "e-m:e-i64:64-n32:64"
2 target triple = "powerpc64le-unknown-linux-gnu"
3
4 ; Function Attrs: nounwind
5 define void @__fmax_double3_3D_exec() #0 {
6 entry:
7 br i1 undef, label %if.then.i, label %fmax_double3.exit
8
9 if.then.i: ; preds = %entry
10 %cmp24.i.i = fcmp ord <3 x double> undef, zeroinitializer
11 %sext25.i.i = sext <3 x i1> %cmp24.i.i to <3 x i64>
12 %neg.i.i = xor <3 x i64> %sext25.i.i,
13 %or.i.i = or <3 x i64> undef, %neg.i.i
14 %neg.i.i.i = select <3 x i1> undef, <3 x i64> zeroinitializer, <3 x i64> %sext25.i.i
15 %and.i.i.i = and <3 x i64> undef, %neg.i.i.i
16 %and26.i.i.i = and <3 x i64> undef, %or.i.i
17 %or.i.i.i = or <3 x i64> %and.i.i.i, %and26.i.i.i
18 %astype32.i.i.i = bitcast <3 x i64> %or.i.i.i to <3 x double>
19 %extractVec33.i.i.i = shufflevector <3 x double> %astype32.i.i.i, <3 x double> undef, <4 x i32>
20 store <4 x double> %extractVec33.i.i.i, <4 x double>* undef, align 32
21 br label %fmax_double3.exit
22
23 ; CHECK-LABEL: @__fmax_double3_3D_exec
24 ; CHECK: xvcmpeqdp
25
26 fmax_double3.exit: ; preds = %if.then.i, %entry
27 br i1 undef, label %if.then, label %do.end
28
29 if.then: ; preds = %fmax_double3.exit
30 unreachable
31
32 do.end: ; preds = %fmax_double3.exit
33 ret void
34 }
35
36 attributes #0 = { nounwind }
37