[llvm] r220067 - R600/SI: Also check for FPImm literal constants

Matt Arsenault Matthew.Arsenault at amd.com
Fri Oct 17 11:00:50 PDT 2014


Author: arsenm
Date: Fri Oct 17 13:00:50 2014
New Revision: 220067

URL: http://llvm.org/viewvc/llvm-project?rev=220067&view=rev
Log:
R600/SI: Also check for FPImm literal constants

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

Modified: llvm/trunk/lib/Target/R600/SIShrinkInstructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIShrinkInstructions.cpp?rev=220067&r1=220066&r2=220067&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIShrinkInstructions.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIShrinkInstructions.cpp Fri Oct 17 13:00:50 2014
@@ -130,7 +130,7 @@ static void foldImmediates(MachineInstr
 
   // Only one literal constant is allowed per instruction, so if src0 is a
   // literal constant then we can't do any folding.
-  if (Src0->isImm() && TII->isLiteralConstant(*Src0))
+  if ((Src0->isImm() || Src0->isFPImm()) && TII->isLiteralConstant(*Src0))
     return;
 
 





More information about the llvm-commits mailing list