<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - 6.0 regression: LLVM ERROR: Cannot select: 0x582f0b00: f32 = X86ISD::FNMSUB 0x582f8740, 0x583805f0, 0x582fde50"
   href="https://bugs.llvm.org/show_bug.cgi?id=36553">36553</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>6.0 regression:  LLVM ERROR: Cannot select: 0x582f0b00: f32 = X86ISD::FNMSUB 0x582f8740, 0x583805f0, 0x582fde50
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sylvestre@debian.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>35804
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19975" name="attach_19975" title="bc5">attachment 19975</a> <a href="attachment.cgi?id=19975&action=edit" title="bc5">[details]</a></span>
bc5

Reported here:
<a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891802">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=891802</a>

this is a regression from llvm-5.0 to llvm-6.0 on i386.

I'm attaching two .bc files from a pocl selftest, one generated with
llvm-5.0, one with llvm-6.0. 

llc-5.0 successfully compiles both, llc-6.0 fails to compile both:

$ llc-5.0 -O2 -mcpu=i686  pocl.trig.llvm5.bc

$ llc-5.0 -O2 -mcpu=i686  pocl.trig.llvm6.bc


$ llc-6.0 -O2 -mcpu=i686  pocl.trig.llvm5.bc
LLVM ERROR: Cannot select: 0x582f0b00: f32 = X86ISD::FNMSUB 0x582f8740,
0x583805f0, 0x582fde50
  0x582f8740: f32 = fsub 0x58314d20, 0x58329d00
    0x58314d20: f32,ch = load<LD4[FixedStack0(align=16)+12](align=4)>
0x583150e0, 0x58322db0, undef:i32
      0x58322db0: i32 = or FrameIndex:i32<0>, Constant:i32<12>
        0x5837f620: i32 = FrameIndex<0>
        0x582c0e40: i32 = Constant<12>
      0x58326f60: i32 = undef
    0x58329d00: f32,ch = load<LD4[FixedStack1]> 0x58329c80, FrameIndex:i32<1>,
undef:i32
      0x582f8180: i32 = FrameIndex<1>
      0x58326f60: i32 = undef
  0x583805f0: f32,ch = load<LD4[ConstantPool]> 0x58223a80, 0x58318150,
undef:i32
    0x58318150: i32 = X86ISD::Wrapper TargetConstantPool:i32<float
0x3C23100000000000> 0
      0x582bbbe0: i32 = TargetConstantPool<float 0x3C23100000000000> 0
    0x58326f60: i32 = undef
  0x582fde50: f32,ch,glue = CopyFromReg 0x5831d6a0, Register:f32 %fp0,
0x5831d6a0:1
    0x58309fe0: f32 = Register %fp0
    0x5831d6a0: ch,glue = callseq_end 0x58320a90, TargetConstant:i32<12>,
TargetConstant:i32<0>, 0x58320a90:1
      0x58315ef0: i32 = TargetConstant<12>
      0x5837f5e0: i32 = TargetConstant<0>
      0x58320a90: ch,glue = X86ISD::CALL 0x583189d0,
TargetExternalSymbol:i32'fmaf', RegisterMask:Untyped
        0x582eff80: i32 = TargetExternalSymbol'fmaf'
        0x58327420: Untyped = RegisterMask
In function: _Z20__pocl_argReductionSPDv4_fS0_S_

$ llc-6.0 -O2 -mcpu=i686  pocl.trig.llvm6.bc
LLVM ERROR: Cannot select: 0x575fb6e0: f32 = X86ISD::FNMSUB 0x575c98d0,
0x575aad80, 0x575c82f0
  0x575c98d0: f32 = fsub 0x575aa740, 0x575754a0
    0x575aa740: f32,ch = load<LD4[FixedStack0(align=16)+12](align=4)>
0x575a8b60, 0x5753a900, undef:i32
      0x5753a900: i32 = or FrameIndex:i32<0>, Constant:i32<12>
        0x575a89e0: i32 = FrameIndex<0>
        0x575b58b0: i32 = Constant<12>
      0x575aa280: i32 = undef
    0x575754a0: f32,ch = load<LD4[FixedStack1]> 0x575a8620, FrameIndex:i32<1>,
undef:i32
      0x575b2d00: i32 = FrameIndex<1>
      0x575aa280: i32 = undef
  0x575aad80: f32,ch = load<LD4[ConstantPool]> 0x574a1260, 0x57588590,
undef:i32
    0x57588590: i32 = X86ISD::Wrapper TargetConstantPool:i32<float
0x3C23100000000000> 0
      0x575ca110: i32 = TargetConstantPool<float 0x3C23100000000000> 0
    0x575aa280: i32 = undef
  0x575c82f0: f32,ch,glue = CopyFromReg 0x575aa100, Register:f32 %fp0,
0x575aa100:1
    0x575a3c20: f32 = Register %fp0
    0x575aa100: ch,glue = callseq_end 0x57580000, TargetConstant:i32<12>,
TargetConstant:i32<0>, 0x57580000:1
      0x5758fdd0: i32 = TargetConstant<12>
      0x575a17f0: i32 = TargetConstant<0>
      0x57580000: ch,glue = X86ISD::CALL 0x575b2030,
TargetExternalSymbol:i32'fmaf', RegisterMask:Untyped
        0x575a8460: i32 = TargetExternalSymbol'fmaf'
        0x575c7cf0: Untyped = RegisterMask
In function: _Z20__pocl_argReductionSPU9CLprivateDv4_fS1_S_</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] 6.0.0 Release Blockers"
   href="https://bugs.llvm.org/show_bug.cgi?id=35804">Bug 35804</a>] [meta] 6.0.0 Release Blockers
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>