From c20e7417992380871261699c2b0123819e7d51fc Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 17 May 2012 20:39:54 -0400 Subject: [PATCH] radeon/llvm: Fix segfault while lowering lrp intrinsic --- src/gallium/drivers/radeon/AMDGPUISelLowering.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeon/AMDGPUISelLowering.cpp b/src/gallium/drivers/radeon/AMDGPUISelLowering.cpp index b447e67bd8a..8df80352085 100644 --- a/src/gallium/drivers/radeon/AMDGPUISelLowering.cpp +++ b/src/gallium/drivers/radeon/AMDGPUISelLowering.cpp @@ -91,8 +91,9 @@ SDValue AMDGPUTargetLowering::LowerIntrinsicLRP(SDValue Op, { DebugLoc DL = Op.getDebugLoc(); EVT VT = Op.getValueType(); - SDValue OneSubA = DAG.getNode(ISD::FSUB, DL, VT, DAG.getConstant(1, VT), - Op.getOperand(1)); + SDValue OneSubA = DAG.getNode(ISD::FSUB, DL, VT, + DAG.getConstantFP(1.0f, MVT::f32), + Op.getOperand(1)); SDValue OneSubAC = DAG.getNode(ISD::FMUL, DL, VT, OneSubA, Op.getOperand(3)); return DAG.getNode(AMDILISD::MAD, DL, VT, Op.getOperand(1), -- 2.30.2