1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -S -instcombine | FileCheck %s
4 define i32 @__isnan(float %x) alwaysinline nounwind optsize {
5 ; CHECK-LABEL: @__isnan(
7 ; CHECK-NEXT: [[DOTCAST:%.*]] = bitcast float [[X:%.*]] to i32
8 ; CHECK-NEXT: [[SHL:%.*]] = shl i32 [[DOTCAST]], 1
9 ; CHECK-NEXT: [[CMP:%.*]] = icmp ugt i32 [[SHL]], -16777216
10 ; CHECK-NEXT: [[CONV:%.*]] = zext i1 [[CMP]] to i32
11 ; CHECK-NEXT: ret i32 [[CONV]]
14 %x.addr = alloca float, align 4
15 store float %x, float* %x.addr, align 4
16 %0 = load float, float* %x.addr, align 4
17 %1 = bitcast float %0 to i32
19 %cmp = icmp ugt i32 %shl, -16777216
20 %conv = zext i1 %cmp to i32
24 define i1 @icmp_shl7(i32 %x) {
25 ; CHECK-LABEL: @icmp_shl7(
26 ; CHECK-NEXT: [[SHL:%.*]] = shl i32 [[X:%.*]], 7
27 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[SHL]], 4608
28 ; CHECK-NEXT: ret i1 [[CMP]]
31 %cmp = icmp slt i32 %shl, 4608