[llvm-commits] [PATCH] [Fast-math] In relaxed FP mode, Instruction::isAssociative() returns true for fmul/fadd

Michael Ilseman milseman at apple.com
Wed Nov 28 17:06:01 PST 2012


On Nov 28, 2012, at 4:53 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:

> Hi, Eli:
> 
>  I'm not able to fabricate such *.ll with mixed fp operator directly from *.c file.
> We have to manually modify the *.ll from the 1st testing case.
> 

You can textually create and edit the .ll file, that's how I made all of the other fast-math test cases.

>  Other that the deprecate CHECK-NOT, is it good to commit?
> 
> Shuxin
> 
> On 11/28/12 4:31 PM, Eli Friedman wrote:
>> On Wed, Nov 28, 2012 at 2:59 PM, Shuxin Yang <shuxin.llvm at gmail.com> wrote:
>>> Hi, Eli:
>>> 
>>>    Thank you for your feedback. I add two testing-cases per your request.
>> +; Same testing-case as the one used in fold() except that the operators have
>> +; fixed FP mode.
>> +define float @notfold(float %a) {
>> +notfold:
>> +; CHECK: notfold
>> +; CHECK-NOT: fmul float %a, 0x4006147AE0000000
>> +  %mul = fmul fast float %a, 0x3FF3333340000000
>> +  %mul1 = fmul float %mul, 0x4002666660000000
>> +  ret float %mul1
>> +}
>> 
>> Please use positive CHECK stmts where possible (i.e. check for the
>> original fmuls, not the absence of the folded one).
>> 
>> Please also include a test where the first fmul is fast, and the second is not.
>> 
>> Please also include testcases for fadd.
>> 
>> -Eli
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list