[PATCH] D149198: [DAGCombiner] Make is so that `udiv` can be folded with `(select c, NonZero, 1)`
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 13 03:47:44 PDT 2023
RKSimon added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/SelectionDAG.h:2344
+ bool isSafeToSpeculativelyExecuteNode(const SDNode *N) const {
+ switch (N->getOpcode()) {
----------------
Add doxygen description
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2390
// We can't hoist div/rem because of immediate UB (not speculatable).
+ if (!DAG.isSafeToSpeculativelyExecuteNode(N))
----------------
update comment
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