[PATCH] D154677: [InstCombine] Add tests for folding `fmul`/`fdiv` by Pow2 to `add`/`sub` of exp; NFC
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 7 08:31:40 PDT 2023
goldstein.w.n added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/fmul-and-fdiv-by-int-pow2.ll:14
+ %conv = uitofp i64 %shl to double
+ %mul = fmul double 9.000000e+00, %conv
+ ret double %mul
----------------
arsenm wrote:
> Add some tests that show flag preservation on fmul/fdiv
Hmm? Can you link to example or reference?
================
Comment at: llvm/test/Transforms/InstCombine/fmul-and-fdiv-by-int-pow2.ll:182
+;
+ %shl = shl nuw i16 1, %cnt
+ %conv = uitofp i16 %shl to half
----------------
arsenm wrote:
> Are the nuws relevant?
They get added anyways for `(shl 1, cnt)`. They are used to make non-zero status easy to determine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154677/new/
https://reviews.llvm.org/D154677
More information about the llvm-commits
mailing list