[PATCH] D149198: [DAGCombiner] Make is so that `udiv` can be folded with `(select c, NonZero, 1)`

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 21:18:47 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:2307
   /// are not generally safe to move around or change.
   bool isSafeToSpeculativelyExecute(unsigned Opcode) const {
     switch (Opcode) {
----------------
pengfei wrote:
> Why don't refactor it directly?
I figured they have seperate purposes. The `Opcode` version is checking whether an opcode is unconditionally safe to speculate, node is asking about this specific case. But I'll check the other usages and see if the refactored version makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149198



More information about the llvm-commits mailing list