~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/X86/2011-07-13-BadFrameIndexDisplacement.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 -march=x86-64 < %s -disable-fp-elim | FileCheck %s
 
2
 
 
3
; This test is checking that we don't crash and we don't incorrectly fold
 
4
; a large displacement and a frame index into a single lea.
 
5
; <rdar://problem/9763308>
 
6
 
 
7
declare void @bar([39 x i8]*)
 
8
define i32 @f(i64 %a, i64 %b) nounwind readnone {
 
9
entry:
 
10
  %stack_main = alloca [39 x i8]
 
11
  call void @bar([39 x i8]* %stack_main)
 
12
  %tmp6 = add i64 %a, -2147483647
 
13
  %.sum = add i64 %tmp6, %b
 
14
  %tmp8 = getelementptr inbounds [39 x i8], [39 x i8]* %stack_main, i64 0, i64 %.sum
 
15
  %tmp9 = load i8, i8* %tmp8, align 1
 
16
  %tmp10 = sext i8 %tmp9 to i32
 
17
  ret i32 %tmp10
 
18
}
 
19
; CHECK-LABEL: f:
 
20
; CHECK: movsbl -2147483647