aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAfanasyev Ivan <ivafanas@gmail.com>2025-04-01 17:06:30 +0700
committerGitHub <noreply@github.com>2025-04-01 12:06:30 +0200
commit337bad3921356fba89409e03793f7d2df846c0e9 (patch)
tree039f3737096aecd8a9db1cabf3c1b282426e2d5c /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent7f14b2a9eb4792155ed31da7bc16cc58cbb1b0fc (diff)
downloadllvm-337bad3921356fba89409e03793f7d2df846c0e9.zip
llvm-337bad3921356fba89409e03793f7d2df846c0e9.tar.gz
llvm-337bad3921356fba89409e03793f7d2df846c0e9.tar.bz2
[EarlyIfConverter] Fix reg killed twice after early-if-predicator and ifcvt (#133554)
Bug relates to `early-if-predicator` and `early-ifcvt` passes. If virtual register has "killed" flag in both basic blocks to be merged into head, both instructions in head basic block will have "killed" flag for this register. It makes MIR incorrect. Example: ``` bb.0: ; if ... %0:intregs = COPY $r0 J2_jumpf %2, %bb.2, implicit-def dead $pc J2_jump %bb.1, implicit-def dead $pc bb.1: ; if.then ... S4_storeiri_io killed %0, 0, 1 J2_jump %bb.3, implicit-def dead $pc bb.2: ; if.else ... S4_storeiri_io killed %0, 0, 1 J2_jump %bb.3, implicit-def dead $pc ``` After early-if-predicator will become: ``` bb.0: %0:intregs = COPY $r0 S4_storeirif_io %1, killed %0, 0, 1 S4_storeirit_io %1, killed %0, 0, 1 ``` Having `killed` flag set twice in bb.0 for `%0` is an incorrect MIR.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions