1 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -O0
3 ; Skipping for arm64, there's no evidence it would ever have hit the same
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.
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
15 define void @test() nounwind {
19 for.cond: ; preds = %for.body, %entry
20 br i1 undef, label %for.body, label %for.end
22 for.body: ; preds = %for.cond
25 for.end: ; preds = %for.cond
28 for.cond6: ; preds = %for.body9, %for.end
29 br i1 undef, label %for.body9, label %while.cond30
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
42 while.cond30: ; preds = %for.cond6