[PATCH] D55402: [AMDGPU] Simplify negated condition

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 7 13:28:50 PST 2018


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:140
+
+  auto *And = TRI->findReachingDef(CondReg, AMDGPU::NoSubRegister,
+                                   *I, MRI, LIS);
----------------
arsenm wrote:
> rampitec wrote:
> > nhaehnle wrote:
> > > Does this (and the other findReachingDef) need to be guarded to ensure the instructions come from the same basic block?
> > > 
> > > Or, to be more precise, against changes to EXEC in between?
> > findReachingDef does that check. Instructions must belong to the same BB. Otherwise a dominator tree would be required. Specific check for exec is not needed, none of the instructions in that chain modify exec, and there can be no such instruction in between of first two as they are not terminators.
> The dominator tree is implicitly used by LiveIntervals anyway
OK, I have switched to MDT use.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55402/new/

https://reviews.llvm.org/D55402





More information about the llvm-commits mailing list