[PATCH] D73317: [GISelKnownBits] Add support for PHIs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 18:23:14 PST 2020


arsenm added a comment.

I do think copies should be ignored for depth. Other places generally try to treat intervening copies as irrelevant. For example the MIRBuilder inserts copies where they aren't actually necessary when inserting a cast that turns out to be a no-op. I wouldn't want arbitrary changes like this to have an observable change on the final result



================
Comment at: llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp:133
+    // PHI's operand are a mix of registers and basic blocks interleaved.
+    // We only care about the registes ones.
+    for (unsigned Idx = 1; Idx < MI.getNumOperands(); Idx += 2) {
----------------
Typo registes


================
Comment at: llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp:115
+  unsigned SrcReg = FinalCopy->getOperand(1).getReg();
+  unsigned DstReg = FinalCopy->getOperand(0).getReg();
+  GISelKnownBits Info(*MF);
----------------
Register


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73317





More information about the llvm-commits mailing list