[llvm-bugs] [Bug 39436] New: ICALL_BRANCH_FUNNEL: Bad machine code: Explicit definition marked as use

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 25 14:57:40 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=39436

            Bug ID: 39436
           Summary: ICALL_BRANCH_FUNNEL: Bad machine code: Explicit
                    definition marked as use
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: francisvm at yahoo.com
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org

LLVM_ENABLE_MACHINE_VERIFIER=1 ./build/bin/llvm-lit -v -a
test/CodeGen/X86/icall-branch-funnel.ll

# After Instruction Selection
# Machine code for function jt2: IsSSA, TracksLiveness
Function Live Ins: $r10 in %0, $rdi in %1, $rsi in %2, $rdx in %3, $rcx in %4,
$r8 in %5, $r9 in %6, $xmm0 in %7, $xmm1 in %8, $xmm2 in %9, $xmm3 in %10,
$xmm4 in %11, $xmm5 in %12, $xmm6 in %13, $xmm7 in %14, $al in %15

bb.0 (%ir-block.1):
  liveins: $r10, $rdi, $rsi, $rdx, $rcx, $r8, $r9, $xmm0, $xmm1, $xmm2, $xmm3,
$xmm4, $xmm5, $xmm6, $xmm7, $al
  %15:gr8 = COPY $al
  %14:vr128 = COPY $xmm7
  %13:vr128 = COPY $xmm6
  %12:vr128 = COPY $xmm5
  %11:vr128 = COPY $xmm4
  %10:vr128 = COPY $xmm3
  %9:vr128 = COPY $xmm2
  %8:vr128 = COPY $xmm1
  %7:vr128 = COPY $xmm0
  %6:gr64 = COPY $r9
  %5:gr64 = COPY $r8
  %4:gr64 = COPY $rcx
  %3:gr64 = COPY $rdx
  %2:gr64 = COPY $rsi
  %1:gr64 = COPY $rdi
  %0:gr64 = COPY $r10
  %16:gr64 = COPY %1:gr64
  %17:gr64 = COPY %2:gr64
  %18:gr64 = COPY %3:gr64
  %19:gr64 = COPY %4:gr64
  %20:gr64 = COPY %5:gr64
  %21:gr64 = COPY %6:gr64
  %22:vr128 = COPY %7:vr128
  %23:vr128 = COPY %8:vr128
  %24:vr128 = COPY %9:vr128
  %25:vr128 = COPY %10:vr128
  %26:vr128 = COPY %11:vr128
  %27:vr128 = COPY %12:vr128
  %28:vr128 = COPY %13:vr128
  %29:vr128 = COPY %14:vr128
  %30:gr8 = COPY %15:gr8
  ICALL_BRANCH_FUNNEL %0:gr64, @g, 0, @f0, 1, @f1

# End machine code for function jt2.

*** Bad machine code: Explicit definition marked as use ***
- function:    jt2
- basic block: %bb.0  (0x7fe24a08b078)
- instruction: ICALL_BRANCH_FUNNEL %0:gr64, @g, 0, @f0, 1, @f1
- operand 0:   %0:gr64
LLVM ERROR: Found 1 machine code errors.

I think the main issue here is that ICALL_BRANCH_FUNNEL is marked as:

let OutOperandList = (outs unknown:$dst);

Replacing that with (outs) seems to trigger an assert.

-- 
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/20181025/635b8444/attachment.html>


More information about the llvm-bugs mailing list