[PATCH] D120202: [AMDGPU] Extend pre-emit peephole to redundantly masked VCC

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 17:25:16 PST 2022


critson added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp:148
+    if (A->getOpcode() == And && SReg == CondReg && !ModifiesExec &&
+        (M->isCompare() || TII->isVOPC(*M)) && TII->isVALU(*M)) {
+      A->eraseFromParent();
----------------
arsenm wrote:
> I think isCompare is always redundant with isVOPC
Switched to using only isVOPC and documented why in a comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120202



More information about the llvm-commits mailing list