[PATCH] D76707: [DAGCombine] Add basic optimizations for FREEZE in SelDag
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 24 10:12:05 PDT 2020
aqjune marked 2 inline comments as done.
aqjune added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:11593
+ if (N0.getOpcode() == ISD::FREEZE)
+ return DAG.getFreeze(N0.getOperand(0));
+
----------------
lebedev.ri wrote:
> Why are we creating a new `freeze x` when we already have `freeze x` in the form of `N0`?
> (if it's due to the freeze semantics, please explain that in the code comment)
You're right, it is fine to return `N0`. It was there because I was watching implementation of visitBITCAST.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76707/new/
https://reviews.llvm.org/D76707
More information about the llvm-commits
mailing list