]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Transforms/LoopVectorize/demanded-bits-of-pointer-instruction.ll
Vendor import of llvm trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / Transforms / LoopVectorize / demanded-bits-of-pointer-instruction.ll
1 ; RUN: opt < %s -loop-vectorize -S | FileCheck %s
2
3 ; getDemandedBits() is called on the pointer-typed GEP instruction here.
4 ; Only make sure we do not crash.
5
6 ; CHECK: @test
7 define void @test(i8* %ptr, i8* %ptr_end) {
8 start:
9   br label %loop
10
11 loop:
12   %ptr2 = phi i8* [ %ptr3, %loop ], [ %ptr, %start ]
13   %x = sext i8 undef to i64
14   %ptr3 = getelementptr inbounds i8, i8* %ptr2, i64 1
15   %cmp = icmp ult i8* %ptr3, %ptr_end
16   br i1 %cmp, label %loop, label %end
17
18 end:
19   ret void
20 }