llvm/test/Object/ar-error.test: Don't check the message "No such file or directory".
[oota-llvm.git] / test / CodeGen / AArch64 / regress-wzr-allocatable.ll
1 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -O0
2
3 ; Skipping for arm64, there's no evidence it would ever have hit the same
4 ; problem.
5
6 ; When WZR wasn't marked as reserved, this function tried to allocate
7 ; it at O0 and then generated an internal fault (mostly incidentally)
8 ; when it discovered that it was already in use for a multiplication.
9
10 ; I'm not really convinced this is a good test since it could easily
11 ; stop testing what it does now with no-one any the wiser. However, I
12 ; can't think of a better way to force the allocator to use WZR
13 ; specifically.
14
15 define void @test() nounwind {
16 entry:
17   br label %for.cond
18
19 for.cond:                                         ; preds = %for.body, %entry
20   br i1 undef, label %for.body, label %for.end
21
22 for.body:                                         ; preds = %for.cond
23   br label %for.cond
24
25 for.end:                                          ; preds = %for.cond
26   br label %for.cond6
27
28 for.cond6:                                        ; preds = %for.body9, %for.end
29   br i1 undef, label %for.body9, label %while.cond30
30
31 for.body9:                                        ; preds = %for.cond6
32   store i16 0, i16* undef, align 2
33   %0 = load i32* undef, align 4
34   %1 = load i32* undef, align 4
35   %mul15 = mul i32 %0, %1
36   %add16 = add i32 %mul15, 32768
37   %div = udiv i32 %add16, 65535
38   %add17 = add i32 %div, 1
39   store i32 %add17, i32* undef, align 4
40   br label %for.cond6
41
42 while.cond30:                                     ; preds = %for.cond6
43   ret void
44 }