Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 35f321d

Browse files
committed
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199918 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cbf7902 commit 35f321d

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

lib/Target/R600/AMDGPUInstructions.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ class SHA256MaPattern <Instruction BFI_INT, Instruction XOR> : Pat <
388388

389389
// Bitfield extract patterns
390390

391+
/*
392+
393+
XXX: The BFE pattern is not working correctly because the XForm is not being
394+
applied.
395+
391396
def legalshift32 : ImmLeaf <i32, [{return Imm >=0 && Imm < 32;}]>;
392397
def bfemask : PatLeaf <(imm), [{return isMask_32(N->getZExtValue());}],
393398
SDNodeXForm<imm, [{ return CurDAG->getTargetConstant(CountTrailingOnes_32(N->getZExtValue()), MVT::i32);}]>>;
@@ -397,6 +402,8 @@ class BFEPattern <Instruction BFE> : Pat <
397402
(BFE $x, $y, $z)
398403
>;
399404

405+
*/
406+
400407
// rotr pattern
401408
class ROTRPattern <Instruction BIT_ALIGN> : Pat <
402409
(rotr i32:$src0, i32:$src1),

lib/Target/R600/R600Instructions.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,9 @@ let Predicates = [isEGorCayman] in {
15261526
i32:$src2))],
15271527
VecALU
15281528
>;
1529-
def : BFEPattern <BFE_UINT_eg>;
1529+
// XXX: This pattern is broken, disabling for now. See comment in
1530+
// AMDGPUInstructions.td for more info.
1531+
// def : BFEPattern <BFE_UINT_eg>;
15301532

15311533
def BFI_INT_eg : R600_3OP <0x06, "BFI_INT", [], VecALU>;
15321534
defm : BFIPatterns <BFI_INT_eg>;

test/CodeGen/R600/bfe_uint.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
22

3+
; XFAIL: *
4+
35
; CHECK: @bfe_def
46
; CHECK: BFE_UINT
57
define void @bfe_def(i32 addrspace(1)* %out, i32 %x) {

0 commit comments

Comments
 (0)