Skip to content

Commit 49510d0

Browse files
committed
test: Add UI tests for testing type analysis autodiff
Signed-off-by: Karan Janthe <karanjanthe@gmail.com>
1 parent 5773d38 commit 49510d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2170
-1
lines changed

src/tools/enzyme

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
//@ run-pass
2+
//@ compile-flags: -Zautodiff=Enable,PrintTAFn=callee -Zautodiff=NoPostopt -C opt-level=3 -Clto=fat -g
3+
//@ no-prefer-dynamic
4+
//@ needs-enzyme
5+
//@ normalize-stderr: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
6+
//@ normalize-stderr: "%[0-9]+" -> "%X"
7+
//@ normalize-stdout: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
8+
//@ normalize-stdout: "%[0-9]+" -> "%X"
9+
10+
#![feature(autodiff)]
11+
12+
use std::autodiff::autodiff_reverse;
13+
14+
#[autodiff_reverse(d_square, Duplicated, Active)]
15+
#[no_mangle]
16+
fn callee(x: &[f32; 3]) -> f32 {
17+
x[0] * x[0] + x[1] * x[1] + x[2] * x[2]
18+
}
19+
20+
fn main() {
21+
let x = [1.0f32, 2.0, 3.0];
22+
let mut df_dx = [0.0f32; 3];
23+
let out = callee(&x);
24+
let out_ = d_square(&x, &mut df_dx, 1.0);
25+
assert_eq!(out, out_);
26+
assert_eq!(2.0, df_dx[0]);
27+
assert_eq!(4.0, df_dx[1]);
28+
assert_eq!(6.0, df_dx[2]);
29+
}

tests/ui/autodiff/type-trees/type-analysis/array.stderr

Lines changed: 198 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
callee - {[-1]:Float@float} |{[-1]:Pointer}:{}
2+
ptr %X: {[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float, [-1,8]:Float@float}
3+
4+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
5+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
6+
%X = getelementptr inbounds nuw i8, ptr %X, i64 4, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float}
7+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
8+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
9+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
10+
%X = getelementptr inbounds nuw i8, ptr %X, i64 8, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float}
11+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
12+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
13+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
14+
ret float %X, !dbg !N: {}
15+
callee - {[-1]:Float@float} |{[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float, [-1,8]:Float@float}:{}
16+
ptr %X: {[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float, [-1,8]:Float@float}
17+
18+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
19+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
20+
%X = getelementptr inbounds nuw i8, ptr %X, i64 4, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float, [-1,4]:Float@float}
21+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
22+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
23+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
24+
%X = getelementptr inbounds nuw i8, ptr %X, i64 8, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float}
25+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
26+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
27+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
28+
ret float %X, !dbg !N: {}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//@ run-pass
2+
//@ compile-flags: -Zautodiff=Enable,PrintTAFn=callee -Zautodiff=NoPostopt -C opt-level=3 -Clto=fat -g
3+
//@ no-prefer-dynamic
4+
//@ needs-enzyme
5+
//@ normalize-stderr: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
6+
//@ normalize-stderr: "%[0-9]+" -> "%X"
7+
//@ normalize-stdout: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
8+
//@ normalize-stdout: "%[0-9]+" -> "%X"
9+
10+
#![feature(autodiff)]
11+
12+
use std::autodiff::autodiff_reverse;
13+
14+
#[autodiff_reverse(d_square, Duplicated, Active)]
15+
#[no_mangle]
16+
fn callee(x: &[[[f32; 2]; 2]; 2]) -> f32 {
17+
let mut sum = 0.0;
18+
for i in 0..2 {
19+
for j in 0..2 {
20+
for k in 0..2 {
21+
sum += x[i][j][k] * x[i][j][k];
22+
}
23+
}
24+
}
25+
sum
26+
}
27+
28+
fn main() {
29+
let x = [[[1.0f32, 2.0], [3.0, 4.0]], [[5.0, 6.0], [7.0, 8.0]]];
30+
let mut df_dx = [[[0.0f32; 2]; 2]; 2];
31+
let out = callee(&x);
32+
let out_ = d_square(&x, &mut df_dx, 1.0);
33+
assert_eq!(out, out_);
34+
for i in 0..2 {
35+
for j in 0..2 {
36+
for k in 0..2 {
37+
assert_eq!(df_dx[i][j][k], 2.0 * x[i][j][k]);
38+
}
39+
}
40+
}
41+
}

tests/ui/autodiff/type-trees/type-analysis/array3d.stderr

Lines changed: 473 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
callee - {[-1]:Float@float} |{[-1]:Pointer}:{}
2+
ptr %X: {[-1]:Pointer, [-1,0]:Float@float}
3+
4+
br label %X, !dbg !N: {}
5+
6+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
7+
br i1 %X, label %X, label %X, !dbg !N: {}
8+
9+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
10+
ret float %X, !dbg !N: {}
11+
12+
%X = phi float [ 0.000000e+00, %X ], [ %X, %X ]: {[-1]:Float@float}
13+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
14+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
15+
%X = getelementptr inbounds nuw [2 x [2 x float]], ptr %X, i64 %X: {[-1]:Pointer, [-1,0]:Float@float}
16+
br label %X, !dbg !N: {}
17+
18+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
19+
br i1 %X, label %X, label %X, !dbg !N: {}
20+
21+
%X = phi float [ %X, %X ], [ %X, %X ]: {[-1]:Float@float}
22+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
23+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
24+
%X = getelementptr inbounds nuw [2 x float], ptr %X, i64 %X: {[-1]:Pointer, [-1,0]:Float@float}
25+
br label %X, !dbg !N: {}
26+
27+
%X = phi float [ %X, %X ], [ %X, %X ]: {[-1]:Float@float}
28+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
29+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
30+
%X = getelementptr inbounds nuw float, ptr %X, i64 %X, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float}
31+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
32+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
33+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
34+
br i1 %X, label %X, label %X, !dbg !N: {}
35+
callee - {[-1]:Float@float} |{[-1]:Pointer, [-1,0]:Float@float}:{}
36+
ptr %X: {[-1]:Pointer, [-1,0]:Float@float}
37+
38+
br label %X, !dbg !N: {}
39+
40+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
41+
br i1 %X, label %X, label %X, !dbg !N: {}
42+
43+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
44+
ret float %X, !dbg !N: {}
45+
46+
%X = phi float [ 0.000000e+00, %X ], [ %X, %X ]: {[-1]:Float@float}
47+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
48+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
49+
%X = getelementptr inbounds nuw [2 x [2 x float]], ptr %X, i64 %X: {[-1]:Pointer, [-1,0]:Float@float}
50+
br label %X, !dbg !N: {}
51+
52+
%X = phi float [ %X, %X ], !dbg !N: {[-1]:Float@float}
53+
br i1 %X, label %X, label %X, !dbg !N: {}
54+
55+
%X = phi float [ %X, %X ], [ %X, %X ]: {[-1]:Float@float}
56+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
57+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
58+
%X = getelementptr inbounds nuw [2 x float], ptr %X, i64 %X: {[-1]:Pointer, [-1,0]:Float@float}
59+
br label %X, !dbg !N: {}
60+
61+
%X = phi float [ %X, %X ], [ %X, %X ]: {[-1]:Float@float}
62+
%X = phi i1 [ true, %X ], [ false, %X ]: {[-1]:Integer}
63+
%X = phi i64 [ 0, %X ], [ 1, %X ]: {[-1]:Integer}
64+
%X = getelementptr inbounds nuw float, ptr %X, i64 %X, !dbg !N: {[-1]:Pointer, [-1,0]:Float@float}
65+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
66+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
67+
%X = fadd float %X, %X, !dbg !N: {[-1]:Float@float}
68+
br i1 %X, label %X, label %X, !dbg !N: {}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//@ run-pass
2+
//@ compile-flags: -Zautodiff=Enable,PrintTAFn=callee -Zautodiff=NoPostopt -C opt-level=3 -Clto=fat -g
3+
//@ no-prefer-dynamic
4+
//@ needs-enzyme
5+
//@ normalize-stderr: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
6+
//@ normalize-stderr: "%[0-9]+" -> "%X"
7+
//@ normalize-stderr: "!nonnull ![0-9]+" -> "!nonnull !N"
8+
//@ normalize-stderr: "!align ![0-9]+" -> "!align !N"
9+
//@ normalize-stdout: "!(dbg|noundef) ![0-9]+" -> "!$1 !N"
10+
//@ normalize-stdout: "%[0-9]+" -> "%X"
11+
//@ normalize-stdout: "!nonnull ![0-9]+" -> "!nonnull !N"
12+
//@ normalize-stdout: "!align ![0-9]+" -> "!align !N"
13+
14+
#![feature(autodiff)]
15+
16+
use std::autodiff::autodiff_reverse;
17+
18+
#[autodiff_reverse(d_square, Duplicated, Active)]
19+
#[no_mangle]
20+
fn callee(x: &Box<f32>) -> f32 {
21+
**x * **x
22+
}
23+
24+
fn main() {
25+
let x = Box::new(7.0f32);
26+
let mut df_dx = Box::new(0.0f32);
27+
let out = callee(&x);
28+
let out_ = d_square(&x, &mut df_dx, 1.0);
29+
assert_eq!(out, out_);
30+
assert_eq!(14.0, *df_dx);
31+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
analyzing function callee
2+
+ knowndata: ptr %X : {[-1]:Pointer} - {}
3+
+ retdata: {[-1]:Float@float}
4+
updating analysis of val: ptr %X current: {} new {[-1]:Pointer} from ptr %X Changed=1 legal=1
5+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer} from ptr %X Changed=0 legal=1
6+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=1 legal=1
7+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
8+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
9+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {} new {} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
10+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {} new {[-1]:Pointer} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=1 legal=1
11+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {} new {} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=0 legal=1
12+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=1 legal=1
13+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
14+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
15+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer, [-1,0]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=1 legal=1
16+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer} new {[-1]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
17+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=1 legal=1
18+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=0 legal=1
19+
updating analysis of val: ptr %X current: {[-1]:Pointer, [-1,0]:Pointer} new {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=1 legal=1
20+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer, [-1,0]:Float@float} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
21+
analyzing function preprocess_callee
22+
+ knowndata: ptr %X : {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} - {}
23+
+ retdata: {[-1]:Float@float}
24+
updating analysis of val: ptr %X current: {} new {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} from ptr %X Changed=1 legal=1
25+
updating analysis of val: ptr %X current: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} new {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} from ptr %X Changed=0 legal=1
26+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=1 legal=1
27+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
28+
updating analysis of val: ptr %X current: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} new {[-1]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
29+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=1 legal=1
30+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer, [-1,0]:Float@float} new {[-1]:Pointer} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=0 legal=1
31+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {} new {[-1]:Float@float} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=1 legal=1
32+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
33+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
34+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
35+
updating analysis of val: ptr %X current: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} new {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
36+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer, [-1,0]:Float@float} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
37+
analyzing function callee
38+
+ knowndata: ptr %X : {[-1]:Pointer} - {}
39+
+ retdata: {[-1]:Float@float}
40+
updating analysis of val: ptr %X current: {} new {[-1]:Pointer} from ptr %X Changed=1 legal=1
41+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer} from ptr %X Changed=0 legal=1
42+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=1 legal=1
43+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
44+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
45+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {} new {} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
46+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {} new {[-1]:Pointer} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=1 legal=1
47+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {} new {} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=0 legal=1
48+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=1 legal=1
49+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
50+
updating analysis of val: %X = fmul float %X, %X, !dbg !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = fmul float %X, %X, !dbg !N Changed=0 legal=1
51+
updating analysis of val: ptr %X current: {[-1]:Pointer} new {[-1]:Pointer, [-1,0]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=1 legal=1
52+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer} new {[-1]:Pointer} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
53+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=1 legal=1
54+
updating analysis of val: %X = load float, ptr %X, align 4, !dbg !N, !noundef !N current: {[-1]:Float@float} new {[-1]:Float@float} from %X = load float, ptr %X, align 4, !dbg !N, !noundef !N Changed=0 legal=1
55+
updating analysis of val: ptr %X current: {[-1]:Pointer, [-1,0]:Pointer} new {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=1 legal=1
56+
updating analysis of val: %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N current: {[-1]:Pointer, [-1,0]:Float@float} new {[-1]:Pointer, [-1,0]:Float@float} from %X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N Changed=0 legal=1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
callee - {[-1]:Float@float} |{[-1]:Pointer}:{}
2+
ptr %X: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float}
3+
4+
%X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N: {[-1]:Pointer, [-1,0]:Float@float}
5+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
6+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
7+
ret float %X, !dbg !N: {}
8+
callee - {[-1]:Float@float} |{[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float}:{}
9+
ptr %X: {[-1]:Pointer, [-1,0]:Pointer, [-1,0,0]:Float@float}
10+
11+
%X = load ptr, ptr %X, align 8, !dbg !N, !nonnull !N, !align !N, !noundef !N: {[-1]:Pointer, [-1,0]:Float@float}
12+
%X = load float, ptr %X, align 4, !dbg !N, !noundef !N: {[-1]:Float@float}
13+
%X = fmul float %X, %X, !dbg !N: {[-1]:Float@float}
14+
ret float %X, !dbg !N: {}

0 commit comments

Comments
 (0)