[PATCH] D26114: [AMDGPU] Allow hoisting of comparisons out of a loop and eliminate condition copies
Valery Pykhtin via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 10:48:42 PDT 2016
vpykhtin accepted this revision.
vpykhtin added a reviewer: vpykhtin.
vpykhtin added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Target/AMDGPU/SILowerI1Copies.cpp:133
+ MachineInstr *Use = RegUses.pop_back_val();
+ if (Use->getOperand(1).getReg() == Dst.getReg()) {
+ unsigned FromReg = Use->getOperand(0).getReg();
----------------
rampitec wrote:
> vpykhtin wrote:
> > if we already know that Use is a copy and it uses Dst why it's needed to check that Operand(1) is Dst? Maybe assert is enough here.
> I'm changing registers in this loop and after the initial use list collection. This is to be on the safe side to check it still uses the same register.
I'm still unsure it can happen but it's too minor to continue.
Repository:
rL LLVM
https://reviews.llvm.org/D26114
More information about the llvm-commits
mailing list