1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/Transforms/LoopStrengthReduce/dont_reverse.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

26 lines
660 B
LLVM

; RUN: opt < %s -loop-reduce -S \
; RUN: | grep "icmp eq i2 %lsr.iv.next, %xmp4344"
; Don't reverse the iteration if the rhs of the compare is defined
; inside the loop.
; Provide legal integer types.
; Declare i2 as legal so that IVUsers accepts to consider %indvar3451
target datalayout = "n2:8:16:32:64"
define void @Fill_Buffer(i2* %p) nounwind {
entry:
br label %bb8
bb8:
%indvar34 = phi i32 [ 0, %entry ], [ %indvar.next35, %bb8 ]
%indvar3451 = trunc i32 %indvar34 to i2
%xmp4344 = load i2, i2* %p
%xmp104 = icmp eq i2 %indvar3451, %xmp4344
%indvar.next35 = add i32 %indvar34, 1
br i1 %xmp104, label %bb10, label %bb8
bb10:
unreachable
}