[PATCH] D154805: [DAGCombiner] Fold IEEE `fmul`/`fdiv` by Pow2 to `add`/`sub` of exp
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 22 08:40:07 PDT 2023
dmgreen added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:27319-27320
+ auto CastToVT = [&](EVT NewVT, SDValue ToCast) {
+ EVT CurVT = ToCast.getValueType();
+ ToCast = PeekThroughCastsAndTrunc(ToCast);
+ if (NewVT == CurVT)
----------------
Hello. It looks like these should be the other way around? Otherwise CurVT might be == NewVT, but ToCast has now looked through a zext.
Testcase: https://godbolt.org/z/xd7TbGa6r
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154805/new/
https://reviews.llvm.org/D154805
More information about the llvm-commits
mailing list