[llvm-branch-commits] [llvm-branch] r204640 - Merging r199918:

Tom Stellard thomas.stellard at amd.com
Mon Mar 24 11:21:29 PDT 2014


Author: tstellar
Date: Mon Mar 24 13:21:29 2014
New Revision: 204640

URL: http://llvm.org/viewvc/llvm-project?rev=204640&view=rev
Log:
Merging r199918:

------------------------------------------------------------------------
r199918 | thomas.stellard | 2014-01-23 10:49:33 -0800 (Thu, 23 Jan 2014) | 8 lines

R600: Disable the BFE pattern

This pattern uses an SDNodeXForm, which isn't being emitted for some
reason.  I can get it to work by attaching the PatLeaf that has the
XForm to the argument in the output pattern, but this results in an
immediate being used in a register operand, which the backend can't
handle yet.

Modified:
    llvm/branches/release_34/lib/Target/R600/AMDGPUInstructions.td
    llvm/branches/release_34/lib/Target/R600/R600Instructions.td
    llvm/branches/release_34/test/CodeGen/R600/bfe_uint.ll

Modified: llvm/branches/release_34/lib/Target/R600/AMDGPUInstructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Target/R600/AMDGPUInstructions.td?rev=204640&r1=204639&r2=204640&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Target/R600/AMDGPUInstructions.td (original)
+++ llvm/branches/release_34/lib/Target/R600/AMDGPUInstructions.td Mon Mar 24 13:21:29 2014
@@ -388,6 +388,11 @@ class SHA256MaPattern <Instruction BFI_I
 
 // Bitfield extract patterns
 
+/*
+
+XXX: The BFE pattern is not working correctly because the XForm is not being
+applied.
+
 def legalshift32 : ImmLeaf <i32, [{return Imm >=0 && Imm < 32;}]>;
 def bfemask : PatLeaf <(imm), [{return isMask_32(N->getZExtValue());}],
                             SDNodeXForm<imm, [{ return CurDAG->getTargetConstant(CountTrailingOnes_32(N->getZExtValue()), MVT::i32);}]>>;
@@ -397,6 +402,8 @@ class BFEPattern <Instruction BFE> : Pat
   (BFE $x, $y, $z)
 >;
 
+*/
+
 // rotr pattern
 class ROTRPattern <Instruction BIT_ALIGN> : Pat <
   (rotr i32:$src0, i32:$src1),

Modified: llvm/branches/release_34/lib/Target/R600/R600Instructions.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/lib/Target/R600/R600Instructions.td?rev=204640&r1=204639&r2=204640&view=diff
==============================================================================
--- llvm/branches/release_34/lib/Target/R600/R600Instructions.td (original)
+++ llvm/branches/release_34/lib/Target/R600/R600Instructions.td Mon Mar 24 13:21:29 2014
@@ -1516,7 +1516,9 @@ let Predicates = [isEGorCayman] in {
                                                i32:$src2))],
     VecALU
   >;
-  def : BFEPattern <BFE_UINT_eg>;
+// XXX: This pattern is broken, disabling for now.  See comment in
+// AMDGPUInstructions.td for more info.
+//  def : BFEPattern <BFE_UINT_eg>;
 
   def BFI_INT_eg : R600_3OP <0x06, "BFI_INT", [], VecALU>;
   defm : BFIPatterns <BFI_INT_eg>;

Modified: llvm/branches/release_34/test/CodeGen/R600/bfe_uint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_34/test/CodeGen/R600/bfe_uint.ll?rev=204640&r1=204639&r2=204640&view=diff
==============================================================================
--- llvm/branches/release_34/test/CodeGen/R600/bfe_uint.ll (original)
+++ llvm/branches/release_34/test/CodeGen/R600/bfe_uint.ll Mon Mar 24 13:21:29 2014
@@ -1,5 +1,7 @@
 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
 
+; XFAIL: *
+
 ; CHECK: @bfe_def
 ; CHECK: BFE_UINT
 define void @bfe_def(i32 addrspace(1)* %out, i32 %x) {





More information about the llvm-branch-commits mailing list