1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/Transforms/LoopStrengthReduce/2011-10-14-IntPtr.ll
Eric Christopher a62270de2c Revert "Temporarily Revert "Add basic loop fusion pass.""
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
2019-04-17 04:52:47 +00:00

28 lines
895 B
LLVM

; 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-LABEL: @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, i8* %ptr.0157, i32 %cond
br label %for.body83
}