1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/pr40289-64bit.ll
Reid Kleckner b259c5545e [X86] Avoid clobbering ESP/RSP in the epilogue.
Summary:
In r345197 ESP and RSP were added to GR32_TC/GR64_TC, allowing them to
be used for tail calls, but this also caused `findDeadCallerSavedReg` to
think they were acceptable targets for clobbering. Filter them out.

Fixes PR40289.

Patch by Geoffry Song!

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D56617

llvm-svn: 351146
2019-01-15 01:24:18 +00:00

11 lines
256 B
LLVM

; RUN: llc < %s -mtriple=x86_64-pc-windows-msvc | FileCheck %s
define cc 92 < 9 x i64 > @clobber() {
%1 = alloca i64
%2 = load volatile i64, i64* %1
ret < 9 x i64 > undef
; CHECK-LABEL: clobber:
; CHECK-NOT: popq %rsp
; CHECK: addq $8, %rsp
}