[llvm-dev] How to debug Before Expand ISel Pseudo-instructions ?

m m via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 9 15:23:35 PST 2019


I'm new to LLVM and I ran llc with -print-before-all and I can see that the IR is already wrong before Expand ISel Pseudo-instructions. The MOVE instruction moves a register to itself and shouldn't be there. How do you debug something like this?

*** IR Dump After Module Verifier ***
define i32* @_Z9test_mathv() #0 {
  %a = alloca i32, align 4
  ret i32* %a
# *** IR Dump Before Expand ISel Pseudo-instructions ***:
# Machine code for function _Z9test_mathv: Properties: <>
Frame Objects:
  fi#0: size=4, align=4, at location [SP]

BB#0: derived from LLVM BB %0
        %vreg0<def> = MOVE %vreg0; CPURegs:%vreg0
        %R4<def> = COPY %vreg0; CPURegs:%vreg0
        JLR %R4

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190109/e1444cdf/attachment.html>

More information about the llvm-dev mailing list