1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=instcombine -S < %s | FileCheck %s
4 define i1 @ugt_vscale64_x_32() vscale_range(1,16) {
5 ; CHECK-LABEL: @ugt_vscale64_x_32(
7 ; CHECK-NEXT: ret i1 false
10 %vscale = call i64 @llvm.vscale.i64()
11 %num_els = shl i64 %vscale, 5
12 %res = icmp ugt i64 %num_els, 1024
16 define i1 @ugt_vscale64_x_31() vscale_range(1,16) {
17 ; CHECK-LABEL: @ugt_vscale64_x_31(
19 ; CHECK-NEXT: ret i1 false
22 %vscale = call i64 @llvm.vscale.i64()
23 %num_els = mul i64 %vscale, 31
24 %res = icmp ugt i64 %num_els, 1024
28 define i1 @ugt_vscale16_x_32() vscale_range(1,16) {
29 ; CHECK-LABEL: @ugt_vscale16_x_32(
31 ; CHECK-NEXT: ret i1 false
34 %vscale = call i16 @llvm.vscale.i16()
35 %num_els = shl i16 %vscale, 5
36 %res = icmp ugt i16 %num_els, 1024
40 define i1 @ult_vscale16() vscale_range(1,16) {
41 ; CHECK-LABEL: @ult_vscale16(
43 ; CHECK-NEXT: ret i1 false
46 %vscale = call i16 @llvm.vscale.i16()
47 %res = icmp ult i16 1024, %vscale
51 define i1 @ule_vscale64() vscale_range(1,16) {
52 ; CHECK-LABEL: @ule_vscale64(
54 ; CHECK-NEXT: ret i1 false
57 %vscale = call i64 @llvm.vscale.i64()
58 %res = icmp ule i64 1024, %vscale
62 define i1 @ueq_vscale64_range4_4() vscale_range(4,4) {
63 ; CHECK-LABEL: @ueq_vscale64_range4_4(
65 ; CHECK-NEXT: ret i1 true
68 %vscale = call i64 @llvm.vscale.i64()
69 %res = icmp eq i64 %vscale, 4
73 define i1 @ne_vscale64_x_32() vscale_range(1,16) {
74 ; CHECK-LABEL: @ne_vscale64_x_32(
76 ; CHECK-NEXT: ret i1 true
79 %vscale = call i64 @llvm.vscale.i64()
80 %num_els = mul i64 %vscale, 32
81 %res = icmp ne i64 %num_els, 39488
85 declare i8 @llvm.vscale.i8()
86 declare i16 @llvm.vscale.i16()
87 declare i32 @llvm.vscale.i32()
88 declare i64 @llvm.vscale.i64()