[PATCH] D117355: [PowerPC] Fix the undef virtual register reading failure for PPC backend trap optimization

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 09:18:50 PST 2022


amyk added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:432
       if (EnableTrapOptimization && TrapOpt) {
+        bool IsVReg =
+            (MI.getNumOperands() && MI.getOperand(0).isReg())
----------------
amyk wrote:
> Might be good to pull out `MI.getOperand(0).isReg()` into a separate variable since you're using it three times here. 
I think you can disregard my comment. I realized later that there are both `isReg()` and `getReg()`, and the latter should be called only when `isReg()` is true. Sorry about that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117355



More information about the llvm-commits mailing list