[llvm-commits] [llvm] r170226 - in /llvm/trunk: lib/Transforms/InstCombine/InstCombineMulDivRem.cpp test/Transforms/InstCombine/fast-math.ll
Michael Ilseman
milseman at apple.com
Mon Dec 17 17:00:58 PST 2012
On Dec 17, 2012, at 4:57 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Dec 17, 2012 at 4:51 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
>> In order to optimize that way, I need to create instruction "I = X * A"
>> first. (Maybe I need to create a dummy instruction
>> to use this instruction as well), then go ahead call SimplifyFMul(). Often
>> time, if fails, I have to toss away the instruction
>> I just created.
>
> The signature is:
>
> Value *SimplifyFMulInst(Value *LHS, Value *RHS,
> FastMathFlags FMF,
> const DataLayout *TD = 0,
> const TargetLibraryInfo *TLI = 0,
> const DominatorTree *DT = 0);
>
> No Instruction* required.
>
As Eli mentioned, this is why those APIs are so convenient!
> -Eli
More information about the llvm-commits
mailing list