[llvm] [InstCombine] optimize powi(X,Y)/X with Ofast (PR #67236)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 14:24:48 PDT 2023
nikic wrote:
@jcranmer-intel Thanks for the great analysis! I guess that means that this fold should be restricted to constant powi arguments, where we can make sure there is no overflow.
Also, this means that this existing fold is also incorrect, right? https://github.com/llvm/llvm-project/blob/d13abd1c7260a4dc7b660f40cb50543260ae9e21/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp#L735-L743 The add there may overflow.
https://github.com/llvm/llvm-project/pull/67236
More information about the llvm-commits
mailing list