<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 - [MIR] Bad MF Property with -start-before=codegenprepare"
   href="https://bugs.llvm.org/show_bug.cgi?id=40743">40743</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[MIR]  Bad MF Property with -start-before=codegenprepare
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The llc input file is under test/CodeGen/SystemZ/

This works fine:

llc -mtriple=s390x-linux-gnu -mcpu=z10 fp-conv-18.ll -o - -verify-machineinstrs

But this results in an error:

llc -mtriple=s390x-linux-gnu -mcpu=z10 fp-conv-18.ll -o tc.mir
-stop-before=codegenprepare

llc -mtriple=s390x-linux-gnu -mcpu=z10 tc.mir -o - -verify-machineinstrs
-start-before=codegenprepare


# After Instruction Selection
# Machine code for function fun1: IsSSA, NoPHIs, TracksLiveness, NoVRegs

bb.0.bb:
  %1:addr64bit = IMPLICIT_DEF
  %0:fp64bit = LDEB killed %1:addr64bit, 0, $noreg :: (load 4 from `<4 x
float>* undef` + 12, align 16)
  %2:gr64bit = LARL @.str
  $r2d = COPY %2:gr64bit
  $f0d = COPY %0:fp64bit
  %3:fp64bit = IMPLICIT_DEF
  $f2d = COPY %3:fp64bit
  $f4d = COPY %0:fp64bit
  %4:fp64bit = IMPLICIT_DEF
  $f6d = COPY %4:fp64bit
  CallJG @printf, <regmask $f8d $f9d $f10d $f11d $f12d $f13d $f14d $f15d $f8q
$f9q $f12q $f13q $f8s $f9s $f10s $f11s $f12s $f13s $f14s $f15s $r6d $r7d $r8d
$r9d $r10d $r11d $r12d $r13d $r14d $r15d $r6h $r7h $r8h and 22 more...>,
implicit $r2d, implicit $f0d, implicit $f2d, implicit $f4d, implicit $f6d

# End machine code for function fun1.

*** Bad machine code: Function has NoVRegs property but there are VReg operands
***
- function:    fun1
LLVM ERROR: Found 1 machine code errors.</pre>
        </div>
      </p>


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

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