[PATCH] D31182: [InstCombine] fadd double (sitofp x), y check that the promotion is valid
Boris Ulasevich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 06:58:32 PDT 2017
boris.ulasevich added inline comments.
================
Comment at: test/Transforms/InstCombine/add-sitofp.ll:16
+; CHECK: fadd float
+ %m = lshr i32 %a, 24
+ %n = and i32 %m, %b
----------------
Why do we need lshr here? %n + 1 = ((%m >>> 24) && %b) + 1 takes range 1..256 - it fits quite well to 23-bit single precision mantissa, and optimisation can be applied here, isn't it?
Does it make sense for you? Do I miss something?
https://reviews.llvm.org/D31182
More information about the llvm-commits
mailing list