Add new testcase for broken indvars case

llvm-svn: 3642
This commit is contained in:
Chris Lattner 2002-09-10 04:54:44 +00:00
parent 80a2568f9b
commit df422ba2b9
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,16 @@
; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
; RUN: as < %s | opt -indvars
;
void %test(int %A, uint %S, sbyte* %S) {
br label %Loop
Loop:
%PIV = phi sbyte* [%S, %0], [%PIVNext, %Loop]
%PIV = cast sbyte* %PIV to ulong
%PIVNext = add ulong %PIV, 8
%PIVNext = cast ulong %PIVNext to sbyte*
br label %Loop
}

View File

@ -0,0 +1,10 @@
LEVEL = ../../../..
include $(LEVEL)/test/Makefile.tests
TESTS := $(wildcard *.ll)
all:: $(addprefix Output/, $(TESTS:%.ll=%.ll.out))
Output/%.ll.out: %.ll Output/.dir $(LOPT)
-$(TESTRUNR) $<