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

Shuxin Yang shuxin.llvm at gmail.com
Wed Nov 28 16:53:17 PST 2012


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.

   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




More information about the llvm-commits mailing list