| ; NOTE: Assertions have been autogenerated by utils/update_llubi_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: not llubi --undef-behavior=zero --verbose < %s 2>&1 | FileCheck %s |
| |
| define void @main() { |
| %alloc = alloca i32 |
| %load_undef1 = load i32, ptr %alloc |
| %load_undef2 = load i32, ptr %alloc |
| %load_noundef = load i32, ptr %alloc, !noundef !{} |
| ret void |
| } |
| ; CHECK: Entering function: main |
| ; CHECK-NEXT: %alloc = alloca i32, align 4 => ptr 0x8 [alloc] |
| ; CHECK-NEXT: %load_undef1 = load i32, ptr %alloc, align 4 => i32 0 |
| ; CHECK-NEXT: %load_undef2 = load i32, ptr %alloc, align 4 => i32 0 |
| ; CHECK-NEXT: Stacktrace: |
| ; CHECK-NEXT: #0 %load_noundef = load i32, ptr %alloc, align 4, !noundef !0 at @main <stdin>:8 |
| ; CHECK-NEXT: Immediate UB detected: The value loaded contains undefined bits. |
| ; CHECK-NEXT: error: Execution of function 'main' failed. |