1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
4 define <vscale x 2 x i1> @sge(<vscale x 2 x i8> %x) {
6 ; CHECK-NEXT: [[CMP:%.*]] = icmp sgt <vscale x 2 x i8> [[X:%.*]], shufflevector (<vscale x 2 x i8> insertelement (<vscale x 2 x i8> poison, i8 -1, i64 0), <vscale x 2 x i8> poison, <vscale x 2 x i32> 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(ptr %X) nounwind {
14 ; CHECK-LABEL: @gep_scalevector1(
15 ; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 2 x ptr> poison, ptr [[X:%.*]], i64 0
16 ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <vscale x 2 x ptr> [[DOTSPLATINSERT]], zeroinitializer
17 ; CHECK-NEXT: [[C:%.*]] = shufflevector <vscale x 2 x i1> [[TMP1]], <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
18 ; CHECK-NEXT: ret <vscale x 2 x i1> [[C]]
20 %A = getelementptr inbounds i32, ptr %X, <vscale x 2 x i64> zeroinitializer
21 %C = icmp eq <vscale x 2 x ptr> %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