[PATCH] R600/SI: Fix assertion from copying a TargetGlobalAddress
Tom Stellard
tom at stellard.net
Mon Sep 8 06:37:08 PDT 2014
On Sun, Sep 07, 2014 at 08:08:01PM +0000, Matt Arsenault wrote:
> Assert in scheduler from an inserted copy_to_regclass from
> a constant.
>
> This only seems to break sometimes when a constant initializer
> address is forced into VGPRs in a non-entry block. No test
> since the only case I've managed to hit only happens with a future
> patch, and that case will also not be a problem once SGPRs are
> used in non-entry blocks.
>
LGTM.
> http://reviews.llvm.org/D5235
>
> Files:
> lib/Target/R600/SIISelLowering.cpp
> Index: lib/Target/R600/SIISelLowering.cpp
> ===================================================================
> --- lib/Target/R600/SIISelLowering.cpp
> +++ lib/Target/R600/SIISelLowering.cpp
> @@ -1684,7 +1684,8 @@
>
> SDNode *Node;
> // We can't use COPY_TO_REGCLASS with FrameIndex arguments.
> - if (isa<FrameIndexSDNode>(Operand)) {
> + if (isa<FrameIndexSDNode>(Operand) ||
> + isa<GlobalAddressSDNode>(Operand)) {
> unsigned Opcode = Operand.getValueType() == MVT::i32 ?
> AMDGPU::S_MOV_B32 : AMDGPU::S_MOV_B64;
> Node = DAG.getMachineNode(Opcode, SDLoc(), Operand.getValueType(),
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list