[PATCH] D125094: [ARM][Thumb] Command-line option to ensure AAPCS compliant Frame Records

Simon Pilgrim via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 06:43:17 PDT 2022


RKSimon added a comment.

@pratlucas I'm seeing errors on my EXPENSIVE_CHECKS builds - please can you take a look?

  Command Output (stdout):
  --
  $ ":" "RUN: at line 1"
  $ "e:\llvm\ninja\bin\llc.exe" "-mtriple" "thumb-arm-none-eabi" "-filetype" "asm" "-o" "-" "E:\llvm\llvm-project\llvm\test\CodeGen\Thumb\frame-chain.ll" "-frame-pointer=all"
  # command stderr:
  
  # After Prologue/Epilogue Insertion & Frame Finalization
  # Machine code for function required_fp: NoPHIs, TracksLiveness, NoVRegs, TiedOpsRewritten, TracksDebugUserValues
  Frame Objects:
    fi#0: size=4, align=4, at location [SP-20]
    fi#1: size=4, align=4, at location [SP-24]
    fi#2: size=4, align=8, at location [SP-32]
    fi#3: size=8, align=8, at location [SP-40]
    fi#4: variable sized, align=1, at location [SP-40]
    fi#5: size=4, align=4, at location [SP-4]
    fi#6: size=4, align=4, at location [SP-8]
    fi#7: size=4, align=4, at location [SP-12]
    fi#8: size=4, align=4, at location [SP-16]
  Function Live Ins: $r0, $r1
  
  bb.0 (%ir-block.2):
    liveins: $r0, $r1, $r4, $lr
    frame-setup tPUSH 14, $noreg, killed $r4, killed $r6, killed $r7, killed $lr, implicit-def $sp, implicit $sp
    frame-setup CFI_INSTRUCTION def_cfa_offset 16
    frame-setup CFI_INSTRUCTION offset $lr, -4
    frame-setup CFI_INSTRUCTION offset $r7, -8
    frame-setup CFI_INSTRUCTION offset $r6, -12
    frame-setup CFI_INSTRUCTION offset $r4, -16
    $r7 = frame-setup tADDrSPi $sp, 2, 14, $noreg
    frame-setup CFI_INSTRUCTION def_cfa $r7, 8
    $sp = frame-setup tSUBspi $sp(tied-def 0), 6, 14, $noreg
    $r6 = tMOVr $sp, 14, $noreg
    $r2 = tMOVr killed $r6, 14, $noreg
    tSTRi killed renamable $r1, renamable $r2, 4, 14, $noreg :: (store (s32) into %ir.4)
    tSTRi renamable $r0, renamable $r2, 5, 14, $noreg :: (store (s32) into %ir.3)
    renamable $r1 = COPY $sp
    tSTRi killed renamable $r1, renamable $r2, 2, 14, $noreg :: (store (s32) into %ir.5, align 8)
    renamable $r1, dead $cpsr = tLSLri renamable $r0, 2, 14, $noreg
    renamable $r1, dead $cpsr = nuw tADDi3 killed renamable $r1, 7, 14, $noreg
    renamable $r3, dead $cpsr = tMOVi8 7, 14, $noreg
    renamable $r1, dead $cpsr = tBIC killed renamable $r1(tied-def 0), killed renamable $r3, 14, $noreg
    renamable $r3 = COPY $sp
    renamable $r1, dead $cpsr = tSUBrr killed renamable $r3, killed renamable $r1, 14, $noreg
    $sp = COPY killed renamable $r1
    renamable $r1, dead $cpsr = tMOVi8 0, 14, $noreg
    tSTRi killed renamable $r1, $r6, 1, 14, $noreg :: (store (s32) into %ir.6 + 4, basealign 8)
    tSTRi killed renamable $r0, killed renamable $r2, 0, 14, $noreg :: (store (s32) into %ir.6, align 8)
    $r4, $cpsr = frame-destroy tSUBi3 killed $r7, 7, 14, $noreg
    $r4, $cpsr = frame-destroy tSUBi8 $r4(tied-def 0), 1, 14, $noreg
    $sp = frame-destroy tMOVr $r4, 14, $noreg
    frame-destroy tPOP 14, $noreg, def $r4, def $r6, def $r7, implicit-def $sp, implicit $sp
    frame-destroy tPOP 14, $noreg, def $r0, implicit-def $sp, implicit $sp
    $lr = frame-destroy tMOVr killed $r0, 14, $noreg
    tBX_RET 14, $noreg
  
  # End machine code for function required_fp.
  
  *** Bad machine code: Non-flag-setting Thumb1 mov is v6-only ***
  - function:    required_fp
  - basic block: %bb.0  (0x166ad7b18e8)
  - instruction: $r2 = tMOVr killed $r6, 14, $noreg
  LLVM ERROR: Found 1 machine code errors.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125094/new/

https://reviews.llvm.org/D125094



More information about the cfe-commits mailing list