llvm.org GIT mirror llvm / c0c1909
Merging r245530: ------------------------------------------------------------------------ r245530 | hfinkel | 2015-08-19 18:18:20 -0700 (Wed, 19 Aug 2015) | 5 lines [PowerPC] Fix the int2fp(fp2int(x)) DAGCombine to ignore ppc_fp128 This DAGCombine was creating custom SDAG nodes with an illegal ppc_fp128 operand type because it was triggering on f64/f32 int2fp(fp2int(ppc_fp128 x)), but shouldn't (it should only apply to f32/f64 types). The result was a crash. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@245573 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
2 changed file(s) with 19 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
99659965 if (Src.getValueType() == MVT::f32) {
99669966 Src = DAG.getNode(ISD::FP_EXTEND, dl, MVT::f64, Src);
99679967 DCI.AddToWorklist(Src.getNode());
9968 } else if (Src.getValueType() != MVT::f64) {
9969 // Make sure that we don't pick up a ppc_fp128 source value.
9970 return SDValue();
99689971 }
99699972
99709973 unsigned FCTOp =
0 ; RUN: llc -mcpu=a2 < %s | FileCheck %s
1 target datalayout = "E-m:e-i64:64-n32:64"
2 target triple = "powerpc64-bgq-linux"
3
4 define linkonce_odr double @test1() {
5 entry:
6 %conv6.i.i = fptosi ppc_fp128 undef to i64
7 %conv.i = sitofp i64 %conv6.i.i to double
8 ret double %conv.i
9
10 ; CHECK-LABEL: @test1
11 ; CHECK: bl __fixtfdi
12 ; CHECK: fcfid
13 ; CHECK: blr
14 }
15