[llvm-bugs] [Bug 24364] New: [x86, FMA] negated fma pattern not recognized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 5 09:30:03 PDT 2015


            Bug ID: 24364
           Summary: [x86, FMA] negated fma pattern not recognized
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Testing llc built from r244046:

$ cat fnmsub.ll 

define float @nmsub(float %a, float %b, float %c) {
  %mul = fmul fast float %a, %b
  %add = fadd fast float %c, %mul
  %neg = fsub fast float 0.0, %add
  ret float %neg

$ ./llc -o - fnmsub.ll -mattr=fma -enable-unsafe-fp-math
    vfmadd213ss    %xmm2, %xmm1, %xmm0
    vxorps    LCPI0_0(%rip), %xmm0, %xmm0


I think this should just be a 'vfnmsub213ss'; we shouldn't have to negate
(vxorps) as a separate operation.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150805/908f68cd/attachment.html>

More information about the llvm-bugs mailing list