1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=aggressive-instcombine -S | FileCheck %s
3 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"
5 ; Aggressive Instcombine should be able ignore unreachable basic block.
7 define void @func_20() {
8 ; CHECK-LABEL: @func_20(
9 ; CHECK-NEXT: for.body94:
10 ; CHECK-NEXT: unreachable
12 ; CHECK-NEXT: [[OR722:%.*]] = or i32 [[OR722]], undef
13 ; CHECK-NEXT: [[OR723:%.*]] = or i32 [[OR722]], 1
14 ; CHECK-NEXT: [[CONV724:%.*]] = trunc i32 [[OR723]] to i16
15 ; CHECK-NEXT: br label [[FOR_COND641:%.*]]
21 %or722 = or i32 %or722, undef
22 %or723 = or i32 %or722, 1
23 %conv724 = trunc i32 %or723 to i16
27 define void @func_21() {
28 ; CHECK-LABEL: @func_21(
29 ; CHECK-NEXT: for.body94:
30 ; CHECK-NEXT: unreachable
32 ; CHECK-NEXT: [[OR722:%.*]] = or i32 [[A:%.*]], undef
33 ; CHECK-NEXT: [[A]] = or i32 [[OR722]], undef
34 ; CHECK-NEXT: [[OR723:%.*]] = or i32 [[OR722]], 1
35 ; CHECK-NEXT: [[CONV724:%.*]] = trunc i32 [[OR723]] to i16
36 ; CHECK-NEXT: br label [[FOR_COND641:%.*]]
42 %or722 = or i32 %a, undef
43 %a = or i32 %or722, undef
44 %or723 = or i32 %or722, 1
45 %conv724 = trunc i32 %or723 to i16