[PATCH] D123881: [X86] Move some hasOneUse checks after checking what the opcode is.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 16 06:49:23 PDT 2022


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM - with one minor



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:48905
+          V.hasOneUse() && V.getOperand(0).hasOneUse() &&
+          isNullConstant(V.getOperand(1)))
+        return V.getOperand(0);
----------------
I guess you can test the isNullConstant first ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123881



More information about the llvm-commits mailing list