[PATCH] D86611: GlobalISel: Combine `op undef, x` to 0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 06:23:26 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1858
+  MachineOperand &MO = MI.getOperand(OpIdx);
+  return MO.isReg() &&
+         getOpcodeDef(TargetOpcode::G_IMPLICIT_DEF, MO.getReg(), MRI);
----------------
The isReg check should be unnecessary


================
Comment at: llvm/test/CodeGen/AArch64/GlobalISel/combine-shl.mir:15
+    $w0 = COPY %2(s32)
+...
----------------
Also test a vector?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86611



More information about the llvm-commits mailing list