[PATCH] D15707: [Thumb] Fix assembler error 'cannot honor width suffix pop {lr}'

Ana Pazos via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 11:28:39 PST 2015


apazos added a comment.

Artyom,

Several tests are still failing due to failure to remove lr operand from the pop instruction.

It will take me some time to reduce each test cases. But I looked at some of the failures and it seems we need to handle conditional branches tBcc to the return as well.

See example IR:

  tPOP pred:14, pred:%noreg, %R4<def>, %LR<def>, %SP<imp-def>, %SP<imp-use>
  tPOP pred:14, pred:%noreg, %R3<def>, %SP<imp-def>, %SP<imp-use>
  %LR<def> = tMOVr %R3<kill>, pred:14, pred:%noreg
  tBcc <BB#4>, pred:0, pred:%CPSR<kill>
    Successors according to CFG: BB#4(0x40000000 / 0x80000000 = 50.00%) BB#3(0x40000000 / 0x80000000 = 50.00%)

BB#3: derived from LLVM BB %if.end6

    Live Ins: %R1 %R2 %LR %R4
    Predecessors according to CFG: BB#2
  %R0<def>, %CPSR<def,dead> = tMOVi8 0, pred:14, pred:%noreg
  tSTRi %R0, %R1, 12, pred:14, pred:%noreg; mem:ST4[%done](tbaa=!14)
  tSTRi %R1<kill>, %R2<kill>, 8, pred:14, pred:%noreg; mem:ST4[%head7](tbaa=!11)
    Successors according to CFG: BB#4(?%)

BB#4: derived from LLVM BB %cleanup

    Live Ins: %R0 %LR %R4
    Predecessors according to CFG: BB#2 BB#3 BB#0 BB#1
  tBX_RET pred:14, pred:%noreg, %R0<imp-use>


http://reviews.llvm.org/D15707





More information about the llvm-commits mailing list