[llvm] r268787 - [X86] Accept imp-defs of GR64 super-registers in FixupBW MOVrr.
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri May 6 15:02:09 PDT 2016
It's still red
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/11638
On Fri, May 6, 2016 at 1:09 PM Ahmed Bougacha via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: ab
> Date: Fri May 6 15:03:03 2016
> New Revision: 268787
>
> URL: http://llvm.org/viewvc/llvm-project?rev=268787&view=rev
> Log:
> [X86] Accept imp-defs of GR64 super-registers in FixupBW MOVrr.
>
> Testcase will follow shortly.
>
> Modified:
> llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp?rev=268787&r1=268786&r2=268787&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86FixupBWInsts.cpp Fri May 6 15:03:03 2016
> @@ -248,11 +248,17 @@ MachineInstr *FixupBWInstPass::tryReplac
> BuildMI(*MF, MI->getDebugLoc(), TII->get(X86::MOV32rr), NewDestReg)
> .addReg(NewSrcReg);
>
> -#ifndef NDEBUG
> - // Make sure we didn't drop any other implicit operand.
> - for (auto &Op : MI->implicit_operands())
> - assert(Op.getReg() == NewDestReg && "Copy imp-defs unrelated reg?");
> -#endif
> + // Make sure we don't drop implicit operands.
> + // We used to imp-def the super, but we don't need to anymore, as we
> turned
> + // it into an explicit def. However, we might still need to imp-def the
> GR64
> + // super-register.
> + for (auto &Op : MI->implicit_operands()) {
> + if (Op.getReg() == NewDestReg && Op.isDef())
> + continue;
> + assert((!Op.isDef() || TRI->isSubRegister(Op.getReg(), NewDestReg)) &&
> + "Copy imp-defs unrelated reg?");
> + MIB.addOperand(Op);
> + }
>
> return MIB;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160506/ab6799c1/attachment.html>
More information about the llvm-commits
mailing list