~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/frame-base.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: llc -mtriple=x86_64-apple-macosx -o - %s | FileCheck %s
 
2
 
 
3
; The issue here was a conflict between forming a %rip-relative lea and a
 
4
; FrameIndex lea. The %rip sanity-checks didn't consider that a base register
 
5
; had been set if we'd already matched a FrameIndex, when it has in reality.
 
6
 
 
7
@var = global i32 0
 
8
 
 
9
define void @test_frame_rip_conflict() {
 
10
; CHECK-LABEL: test_frame_rip_conflict:
 
11
; CHECK: leaq _var(%rip), [[TMPADDR:%r.*]]
 
12
; CHECK: leaq {{-?[0-9]+}}(%rsp,[[TMPADDR]]),
 
13
  %stackvar = alloca i32
 
14
 
 
15
  %stackint = ptrtoint i32* %stackvar to i64
 
16
  %addr = add i64 ptrtoint(i32* @var to i64), %stackint
 
17
 
 
18
  call void @eat_i64(i64 %addr)
 
19
  ret void
 
20
}
 
21
 
 
22
declare void @eat_i64(i64)