[llvm] r222630 - R600: Fix assert on copy of an i1 on pre-SI

Matt Arsenault Matthew.Arsenault at amd.com
Sat Nov 22 18:57:52 PST 2014


Author: arsenm
Date: Sat Nov 22 20:57:52 2014
New Revision: 222630

URL: http://llvm.org/viewvc/llvm-project?rev=222630&view=rev
Log:
R600: Fix assert on copy of an i1 on pre-SI

i1 is not a legal type on Evergreen, so this combine proceeded
and tried to produce a bitcast between i1 and i8.

Modified:
    llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp?rev=222630&r1=222629&r2=222630&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/AMDGPUISelLowering.cpp Sat Nov 22 20:57:52 2014
@@ -2155,7 +2155,8 @@ SDValue AMDGPUTargetLowering::performSto
   SDValue Value = SN->getValue();
   EVT VT = Value.getValueType();
 
-  if (isTypeLegal(VT) || SN->isVolatile() || !ISD::isNormalLoad(Value.getNode()))
+  if (isTypeLegal(VT) || SN->isVolatile() ||
+      !ISD::isNormalLoad(Value.getNode()) || VT.getSizeInBits() < 8)
     return SDValue();
 
   LoadSDNode *LoadVal = cast<LoadSDNode>(Value);





More information about the llvm-commits mailing list