1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 define <vscale x 2 x i1> @sge(<vscale x 2 x i8> %x) {
6 ; CHECK-NEXT: [[CMP:%.*]] = icmp sge <vscale x 2 x i8> [[X:%.*]], zeroinitializer
7 ; CHECK-NEXT: ret <vscale x 2 x i1> [[CMP]]
9 %cmp = icmp sge <vscale x 2 x i8> %x, zeroinitializer
10 ret <vscale x 2 x i1> %cmp
13 define <vscale x 2 x i1> @gep_scalevector1(i32* %X) nounwind {
14 ; CHECK-LABEL: @gep_scalevector1(
15 ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x i32*> poison, i32* [[X:%.*]], i32 0
16 ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <vscale x 2 x i32*> [[DOTSPLATINSERT]], zeroinitializer
17 ; CHECK-NEXT: [[C:%.*]] = shufflevector <vscale x 2 x i1> [[TMP1]], <vscale x 2 x i1> undef, <vscale x 2 x i32> zeroinitializer
18 ; CHECK-NEXT: ret <vscale x 2 x i1> [[C]]
20 %A = getelementptr inbounds i32, i32* %X, <vscale x 2 x i64> zeroinitializer
21 %C = icmp eq <vscale x 2 x i32*> %A, zeroinitializer
22 ret <vscale x 2 x i1> %C
25 define <vscale x 2 x i1> @signbit_bitcast_fpext_scalevec(<vscale x 2 x half> %x) {
26 ; CHECK-LABEL: @signbit_bitcast_fpext_scalevec(
27 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <vscale x 2 x half> [[X:%.*]] to <vscale x 2 x i16>
28 ; CHECK-NEXT: [[R:%.*]] = icmp slt <vscale x 2 x i16> [[TMP1]], zeroinitializer
29 ; CHECK-NEXT: ret <vscale x 2 x i1> [[R]]
31 %f = fpext <vscale x 2 x half> %x to <vscale x 2 x float>
32 %b = bitcast <vscale x 2 x float> %f to <vscale x 2 x i32>
33 %r = icmp slt <vscale x 2 x i32> %b, zeroinitializer
34 ret <vscale x 2 x i1> %r