| OLD | NEW |
| 1 ; Test that potentially widened loads to not trigger an error report | 1 ; Test that potentially widened loads to not trigger an error report |
| 2 | 2 |
| 3 ; REQUIRES: no_minimal_build | 3 ; REQUIRES: no_minimal_build |
| 4 | 4 |
| 5 ; check for wide load exception | 5 ; check for wide load exception |
| 6 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ | 6 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ |
| 7 ; RUN: --fsanitize-address --sz="-allow-externally-defined-symbols" \ | 7 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ |
| 8 ; RUN: %t.pexe -o %t && %t | FileCheck %s --check-prefix=WIDE --allow-empty | 8 ; RUN: %t.pexe -o %t && %t | FileCheck %s --check-prefix=WIDE --allow-empty |
| 9 | 9 |
| 10 ; check for error reporting | 10 ; check for error reporting |
| 11 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ | 11 ; RUN: llvm-as %s -o - | pnacl-freeze > %t.pexe && %S/../../pydir/szbuild.py \ |
| 12 ; RUN: --fsanitize-address --sz="-allow-externally-defined-symbols" \ | 12 ; RUN: --fsanitize-address --sz=-allow-externally-defined-symbols \ |
| 13 ; RUN: %t.pexe -o %t && %t 1 2>&1 | FileCheck %s --check-prefix=NOWIDE | 13 ; RUN: %t.pexe -o %t && %t 1 2>&1 | FileCheck %s --check-prefix=NOWIDE |
| 14 | 14 |
| 15 | 15 |
| 16 declare external void @exit(i32) | 16 declare external void @exit(i32) |
| 17 | 17 |
| 18 define internal void @wide_load() { | 18 define internal void @wide_load() { |
| 19 %str = alloca i8, i32 1, align 1 | 19 %str = alloca i8, i32 1, align 1 |
| 20 %str4 = bitcast i8* %str to i32* | 20 %str4 = bitcast i8* %str to i32* |
| 21 %contents = load i32, i32* %str4, align 1 | 21 %contents = load i32, i32* %str4, align 1 |
| 22 call void @exit(i32 0) | 22 call void @exit(i32 0) |
| (...skipping 23 matching lines...) Expand all Loading... |
| 46 wide_load: | 46 wide_load: |
| 47 call void @wide_load() | 47 call void @wide_load() |
| 48 br label %error | 48 br label %error |
| 49 no_wide_load: | 49 no_wide_load: |
| 50 call void @no_wide_load() | 50 call void @no_wide_load() |
| 51 br label %error | 51 br label %error |
| 52 error: | 52 error: |
| 53 call void @exit(i32 1) | 53 call void @exit(i32 1) |
| 54 unreachable | 54 unreachable |
| 55 } | 55 } |
| OLD | NEW |