1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -aggressive-instcombine -S | FileCheck %s
3 ; RUN: opt < %s -passes=aggressive-instcombine -S | FileCheck %s
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
6 ; Aggressive Instcombine should be able ignore unreachable basic block.
8 define void @func_20() {
9 ; CHECK-LABEL: @func_20(
10 ; CHECK-NEXT: for.body94:
11 ; CHECK-NEXT: unreachable
13 ; CHECK-NEXT: [[OR722:%.*]] = or i32 [[OR722]], undef
14 ; CHECK-NEXT: [[OR723:%.*]] = or i32 [[OR722]], 1
15 ; CHECK-NEXT: [[CONV724:%.*]] = trunc i32 [[OR723]] to i16
16 ; CHECK-NEXT: br label [[FOR_COND641:%.*]]
22 %or722 = or i32 %or722, undef
23 %or723 = or i32 %or722, 1
24 %conv724 = trunc i32 %or723 to i16
28 define void @func_21() {
29 ; CHECK-LABEL: @func_21(
30 ; CHECK-NEXT: for.body94:
31 ; CHECK-NEXT: unreachable
33 ; CHECK-NEXT: [[OR722:%.*]] = or i32 [[A:%.*]], undef
34 ; CHECK-NEXT: [[A]] = or i32 [[OR722]], undef
35 ; CHECK-NEXT: [[OR723:%.*]] = or i32 [[OR722]], 1
36 ; CHECK-NEXT: [[CONV724:%.*]] = trunc i32 [[OR723]] to i16
37 ; CHECK-NEXT: br label [[FOR_COND641:%.*]]
43 %or722 = or i32 %a, undef
44 %a = or i32 %or722, undef
45 %or723 = or i32 %or722, 1
46 %conv724 = trunc i32 %or723 to i16