Files
clang-p2996/llvm/test/CodeGen/X86/twoaddr-dbg-value.mir
Simon Pilgrim d391e4fe84 [X86] Update RET/LRET instruction to use the same naming convention as IRET (PR36876). NFC
Be more consistent in the naming convention for the various RET instructions to specify in terms of bitwidth.

Helps prevent future scheduler model mismatches like those that were only addressed in D44687.

Differential Revision: https://reviews.llvm.org/D113302
2021-11-07 15:06:54 +00:00

28 lines
810 B
YAML

# RUN: llc -run-pass=livevars,twoaddressinstruction -mtriple=x86_64-- -o - %s | FileCheck %s
---
name: foo
tracksRegLiveness: true
body: |
bb.0:
liveins: $edi
%0:gr32 = COPY killed $edi
%1:gr32 = COPY killed %0
%4:gr32 = XOR32ri8 %1, 1, implicit-def dead $eflags
DBG_VALUE %4
%5:gr32 = COPY %4
PUSH32r killed %1, implicit-def $esp, implicit $esp
$eax = COPY killed %5
RET64 implicit killed $eax
...
# Verify that the DBG_VALUE instruction does not inhibit
# TwoAddressInstructionPass::rescheduleMIBelowKill optimization
# CHECK: PUSH32r %1, implicit-def $esp, implicit $esp
# CHECK-NEXT: %2:gr32 = COPY killed %1
# CHECK-NEXT: %2:gr32 = XOR32ri8 %2, 1, implicit-def dead $eflags
# CHECK-NEXT: DBG_VALUE %2
# CHECK-NEXT: %3:gr32 = COPY killed %2