[PATCH] D104440: [X86] Fix bug when X86 stackify pass handle one ArgFPRW.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 19 20:49:52 PDT 2021


LuoYuanke added a comment.

> Did you run llvm-extract to isolate the broken function first? bugpoint is not good at that.

Thanks Craig for the suggestion. After run "llvm-extract --recursive" and get the small file, I can't reproduce this issue. However I use -print-after-all to dump the IR of each pass. The undefine value is created in "processimpdefs" pass.

From

  bb.11 (%ir-block.61):
  ; predecessors: %bb.10
    successors: %bb.26
  
    %164:gr64 = MOV64ri @.str.3.16422
    %165:gr32 = MOV32r0 implicit-def $eflags
    %166:gr64 = SUBREG_TO_REG 0, %165:gr32, %subreg.sub_32bit
    %167:gr64 = LEA64r %stack.6, 1, $noreg, 0, $noreg
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
    $rdi = COPY %164:gr64
    $rsi = COPY %166:gr64
    $rdx = COPY %167:gr64
    CALL64pcrel32 @_ZN5boost4math8policies20raise_overflow_errorIeNS1_6policyINS1_13promote_floatILb0EEENS1_14promote_doubleILb0EEENS1_14default_policyES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EEEET_PKcSC_RKT0_, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit $rsp, implicit $ssp, implicit $rdi, implicit $rsi, implicit $rdx, implicit-def $fp0
    ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
    %168:rfp80 = COPY $fp0
    %162:rfp80 = IMPLICIT_DEF
    %163:rfp80 = CHS_Fp80 %162:rfp80, implicit-def $fpsw
    JMP_1 %bb.26

To

  bb.11 (%ir-block.61):
  ; predecessors: %bb.10
    successors: %bb.26
  
    %164:gr64 = MOV64ri @.str.3.16422
    %165:gr32 = MOV32r0 implicit-def $eflags
    %166:gr64 = SUBREG_TO_REG 0, %165:gr32, %subreg.sub_32bit
    %167:gr64 = LEA64r %stack.6, 1, $noreg, 0, $noreg
    ADJCALLSTACKDOWN64 0, 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
    $rdi = COPY %164:gr64
    $rsi = COPY %166:gr64
    $rdx = COPY %167:gr64
    CALL64pcrel32 @_ZN5boost4math8policies20raise_overflow_errorIeNS1_6policyINS1_13promote_floatILb0EEENS1_14promote_doubleILb0EEENS1_14default_policyES8_S8_S8_S8_S8_S8_S8_S8_S8_S8_EEEET_PKcSC_RKT0_, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit $rsp, implicit $ssp, implicit $rdi, implicit $rsi, implicit $rdx, implicit-def $fp0
    ADJCALLSTACKUP64 0, 0, implicit-def $rsp, implicit-def $eflags, implicit-def $ssp, implicit $rsp, implicit $ssp
    %168:rfp80 = COPY $fp0
    %163:rfp80 = CHS_Fp80 undef %162:rfp80, implicit-def $fpsw
    JMP_1 %bb.26

Is this transform reasonable? "%162:rfp80 = IMPLICIT_DEF" is generated in ISel. I will look into why "%162:rfp80 = IMPLICIT_DEF" is generated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104440



More information about the llvm-commits mailing list