[llvm] 4109483 - [PHIElimination] Pre-commit a test case for D110834
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 12:04:47 PDT 2021
Author: Jay Foad
Date: 2021-10-07T20:04:39+01:00
New Revision: 41094830134092daf07dc3fa4715b2bc439c2dde
URL: https://github.com/llvm/llvm-project/commit/41094830134092daf07dc3fa4715b2bc439c2dde
DIFF: https://github.com/llvm/llvm-project/commit/41094830134092daf07dc3fa4715b2bc439c2dde.diff
LOG: [PHIElimination] Pre-commit a test case for D110834
Added:
Modified:
llvm/test/CodeGen/X86/callbr-asm-kill.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/callbr-asm-kill.mir b/llvm/test/CodeGen/X86/callbr-asm-kill.mir
index 12d40dab7584..b5d86ae6c143 100644
--- a/llvm/test/CodeGen/X86/callbr-asm-kill.mir
+++ b/llvm/test/CodeGen/X86/callbr-asm-kill.mir
@@ -1,9 +1,8 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
-# RUN: llc -mtriple=x86_64-unknown-linux-gnu -verify-machineinstrs -O2 -run-pass=phi-node-elimination -o - %s | FileCheck %s
+# RUN: llc -mtriple=x86_64-unknown-linux-gnu -O2 -run-pass=livevars,phi-node-elimination -o - %s | FileCheck %s
-# This test case will be used to test a case where PHIElimination was wrongly
-# inserting kill flags in the presence of an INLINEASM_BR instruction. See:
-# https://reviews.llvm.org/D110834.
+# FIXME: The COPY from [[MOV64rm]] should not be killed, because there is a
+# subsequent use of [[MOV64rm]] in the INLINEASM_BR instruction.
--- |
; ModuleID = '<stdin>'
source_filename = "<stdin>"
@@ -55,18 +54,18 @@ body: |
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY killed $rsi
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY killed $rdi
- ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr64 = COPY [[COPY1]]
+ ; CHECK-NEXT: [[COPY2:%[0-9]+]]:gr64 = COPY killed [[COPY1]]
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: bb.1.loop (address-taken, inlineasm-br-indirect-target):
; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.1(0x00000000)
; CHECK-NEXT: {{ $}}
- ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr64 = COPY [[COPY2]]
+ ; CHECK-NEXT: [[COPY3:%[0-9]+]]:gr64 = COPY killed [[COPY2]]
; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s64) from %ir.mem)
; CHECK-NEXT: ADJCALLSTACKDOWN64 0, 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
; CHECK-NEXT: $rdi = COPY killed [[COPY3]]
; CHECK-NEXT: CALL64pcrel32 target-flags(x86-plt) @foo, csr_64, implicit $rsp, implicit $ssp, implicit killed $rdi, implicit-def $rsp, implicit-def $ssp
; CHECK-NEXT: ADJCALLSTACKUP64 0, 0, implicit-def dead $rsp, implicit-def dead $eflags, implicit-def dead $ssp, implicit $rsp, implicit $ssp
- ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr64 = COPY [[MOV64rm]]
+ ; CHECK-NEXT: [[COPY4:%[0-9]+]]:gr64 = COPY killed [[MOV64rm]]
; CHECK-NEXT: INLINEASM_BR &"", 9 /* sideeffect mayload attdialect */, 196654 /* mem:m */, [[MOV64rm]], 1, $noreg, 0, $noreg, 13 /* imm */, blockaddress(@test1, %ir-block.loop)
; CHECK-NEXT: JMP_1 %bb.2
; CHECK-NEXT: {{ $}}
More information about the llvm-commits
mailing list