OLD | NEW |
(Empty) | |
| 1 ; RUN: opt %s -pnacl-abi-simplify-postopt -S | FileCheck %s |
| 2 ; RUN: opt %s -pnacl-abi-simplify-postopt -S \ |
| 3 ; RUN: | FileCheck %s -check-prefix=CLEANUP |
| 4 |
| 5 ; "-pnacl-abi-simplify-postopt" runs various passes which are tested |
| 6 ; thoroughly in other *.ll files. This file is a smoke test to check |
| 7 ; that the passes work together OK. |
| 8 |
| 9 target datalayout = "p:32:32:32" |
| 10 |
| 11 @var = global i32 256 |
| 12 ; CHECK: @var = global [4 x i8] |
| 13 |
| 14 define i16 @read_var() { |
| 15 %val = load i16* bitcast (i32* @var to i16*) |
| 16 ret i16 %val |
| 17 } |
| 18 ; CHECK: = bitcast [4 x i8]* @var |
| 19 ; CHECK-NEXT: load i16* |
| 20 |
| 21 ; Check that dead prototypes are successfully removed. |
| 22 declare void @unused_prototype(i8*) |
| 23 ; CLEANUP-NOT: unused_prototype |
OLD | NEW |