forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InlineSpiller] Don't call TargetInstrInfo::foldMemoryOperand with an…
… empty list. Since r287792 if we try to do that we will hit an assert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289001 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Quentin Colombet
committed
Dec 8, 2016
1 parent
8302e1c
commit aff0cae
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# RUN: llc -run-pass=greedy -mtriple=x86_64-apple-macosx -o - %s 2>&1 | FileCheck %s | ||
|
||
# Make sure we don't assert when we try to reload a value that is just implicitly used. | ||
--- | ||
# CHECK: name: foo | ||
# This test forces a spill of %0. | ||
name: foo | ||
registers: | ||
- { id: 0, class: gr64 } | ||
body: | | ||
bb.0: | ||
; CHECK: NOOP implicit-def [[VAL:%[0-9]+]] | ||
; VAL should be spilled before csr_noregs, i.e., before we clobber all the registers | ||
; CHECK-NEXT: MOV64mr [[SLOT:%stack.[0-9]+]], 1, _, 0, _, [[VAL]] | ||
; CHECK-NEXT: NOOP csr_noregs | ||
; We need to reload before the (implicit) use. | ||
; CHECK-NEXT: [[RELOADED_VAL:%[0-9]+]] = MOV64rm [[SLOT]], 1, _, 0, _ | ||
; CHECK-NEXT: NOOP implicit [[RELOADED_VAL]] | ||
NOOP implicit-def %0 | ||
NOOP csr_noregs | ||
NOOP implicit %0 | ||
... |