From: Tom Stellard Date: Fri, 18 May 2012 00:39:54 +0000 (-0400) Subject: radeon/llvm: Fix segfault while lowering lrp intrinsic X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c20e7417992380871261699c2b0123819e7d51fc;p=mesa.git radeon/llvm: Fix segfault while lowering lrp intrinsic --- 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),