| ; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: llubi --verbose < %s 2>&1 | FileCheck %s |
| |
| define i32 @callee() { |
| ret i32 10 |
| } |
| |
| define float @callee_fp() { |
| ret float 0.0 |
| } |
| |
| define ptr @callee_ptr(ptr %x) { |
| ret ptr %x |
| } |
| |
| define void @main() { |
| %alloc = alloca i32 |
| store i32 1, ptr %alloc |
| %range_load_valid = load i32, ptr %alloc, !noundef !{}, !range !{i32 0, i32 10} |
| %range_load_invalid = load i32, ptr %alloc, !range !{i32 2, i32 10} |
| %alloc_vec = alloca <8 x i32> |
| store <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>, ptr %alloc_vec |
| %range_list_load_vec = load <8 x i32>, ptr %alloc_vec, !range !{i32 3, i32 4, i32 5, i32 6, i32 7, i32 2} |
| store float 0.0, ptr %alloc |
| %nofpclass_load_valid = load float, ptr %alloc, !noundef !{}, !nofpclass !{i32 3} |
| %nofpclass_load_invalid = load float, ptr %alloc, !nofpclass !{i32 99} |
| |
| %alloc_ptr = alloca ptr |
| store ptr %alloc_ptr, ptr %alloc_ptr |
| %align_nonnull_load_valid = load ptr, ptr %alloc_ptr, !nonnull !{}, !align !{i64 8}, !noundef !{}, !dereferenceable !{i64 8}, !dereferenceable_or_null !{i64 8} |
| store ptr null, ptr %alloc_ptr |
| %align_load_valid = load ptr, ptr %alloc_ptr, !align !{i64 8}, !noundef !{}, !dereferenceable_or_null !{i64 8} |
| %nonnull_load_invalid = load ptr, ptr %alloc_ptr, !nonnull !{} |
| |
| %range_call_valid = call i32 @callee(), !range !{i32 0, i32 11} |
| %range_call_invalid = call i32 @callee(), !range !{i32 0, i32 10} |
| ret void |
| } |
| ; CHECK: Entering function: main |
| ; CHECK-NEXT: %alloc = alloca i32, align 4 => ptr 0x8 [alloc] |
| ; CHECK-NEXT: store i32 1, ptr %alloc, align 4 |
| ; CHECK-NEXT: %range_load_valid = load i32, ptr %alloc, align 4, !range !0, !noundef !1 => i32 1 |
| ; CHECK-NEXT: %range_load_invalid = load i32, ptr %alloc, align 4, !range !2 => poison |
| ; CHECK-NEXT: %alloc_vec = alloca <8 x i32>, align 32 => ptr 0x20 [alloc_vec] |
| ; CHECK-NEXT: store <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>, ptr %alloc_vec, align 32 |
| ; CHECK-NEXT: %range_list_load_vec = load <8 x i32>, ptr %alloc_vec, align 32, !range !3 => { i32 0, i32 1, poison, i32 3, poison, i32 5, poison, i32 7 } |
| ; CHECK-NEXT: store float 0.000000e+00, ptr %alloc, align 4 |
| ; CHECK-NEXT: %nofpclass_load_valid = load float, ptr %alloc, align 4, !noundef !1, !nofpclass !4 => float 0.000000e+00 |
| ; CHECK-NEXT: %nofpclass_load_invalid = load float, ptr %alloc, align 4, !nofpclass !5 => poison |
| ; CHECK-NEXT: %alloc_ptr = alloca ptr, align 8 => ptr 0x48 [alloc_ptr] |
| ; CHECK-NEXT: store ptr %alloc_ptr, ptr %alloc_ptr, align 8 |
| ; CHECK-NEXT: %align_nonnull_load_valid = load ptr, ptr %alloc_ptr, align 8, !nonnull !1, !dereferenceable !6, !dereferenceable_or_null !6, !align !6, !noundef !1 => ptr 0x48 [alloc_ptr] |
| ; CHECK-NEXT: store ptr null, ptr %alloc_ptr, align 8 |
| ; CHECK-NEXT: %align_load_valid = load ptr, ptr %alloc_ptr, align 8, !dereferenceable_or_null !6, !align !6, !noundef !1 => ptr 0x0 [nullary] |
| ; CHECK-NEXT: %nonnull_load_invalid = load ptr, ptr %alloc_ptr, align 8, !nonnull !1 => poison |
| ; CHECK-NEXT: Entering function: callee |
| ; CHECK-NEXT: ret i32 10 |
| ; CHECK-NEXT: Exiting function: callee |
| ; CHECK-NEXT: %range_call_valid = call i32 @callee(), !range !7 => i32 10 |
| ; CHECK-NEXT: Entering function: callee |
| ; CHECK-NEXT: ret i32 10 |
| ; CHECK-NEXT: Exiting function: callee |
| ; CHECK-NEXT: %range_call_invalid = call i32 @callee(), !range !0 => poison |
| ; CHECK-NEXT: ret void |
| ; CHECK-NEXT: Exiting function: main |