File: 2011-10-14-IntPtr.ll

package info (click to toggle)
llvm-3.0 3.0-10
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 75,412 kB
  • sloc: cpp: 468,043; asm: 109,345; ansic: 13,782; sh: 12,935; ml: 4,716; python: 4,351; perl: 2,096; makefile: 1,905; pascal: 1,578; exp: 389; xml: 283; lisp: 187; csh: 117
file content (27 lines) | stat: -rw-r--r-- 884 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
; RUN: opt -loop-reduce -S < %s | FileCheck %s
;
; Test SCEVExpander reusing a phi->gep->phi IV when SCEV "wrongly"
; reports the expression as an IntegerTy.

target triple = "x86_64-apple-darwin"

; CHECK: @test
; CHECK: phi
; CHECK-NOT: phi
define void @test(i32 %rowStride) ssp align 2 {
entry:
  %cond = select i1 undef, i32 %rowStride, i32 4
  br label %for.end

for.end.critedge:                                 ; preds = %for.end
  br label %for.end

for.end:                                          ; preds = %for.end.critedge, %entry
  br i1 undef, label %for.body83, label %for.end.critedge

for.body83:                                       ; preds = %for.body83, %for.end
  %ptr.0157 = phi i8* [ %add.ptr96, %for.body83 ], [ null, %for.end ]
  store i8 undef, i8* %ptr.0157, align 1
  %add.ptr96 = getelementptr inbounds i8* %ptr.0157, i32 %cond
  br label %for.body83
}