; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt -passes=instcombine -S < %s | FileCheck %s target triple = "aarch64" define i16 @clastb_n_i16( %pg, i16 %a, %b) { ; CHECK-LABEL: @clastb_n_i16( ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i16 [[A:%.*]] to half ; CHECK-NEXT: [[TMP2:%.*]] = bitcast [[B:%.*]] to ; CHECK-NEXT: [[TMP3:%.*]] = call half @llvm.aarch64.sve.clastb.n.nxv8f16( [[PG:%.*]], half [[TMP1]], [[TMP2]]) ; CHECK-NEXT: [[TMP4:%.*]] = bitcast half [[TMP3]] to i16 ; CHECK-NEXT: ret i16 [[TMP4]] ; %out = call i16 @llvm.aarch64.sve.clastb.n.nxv8i16( %pg, i16 %a, %b) ret i16 %out } define i32 @clastb_n_i32( %pg, i32 %a, %b) { ; CHECK-LABEL: @clastb_n_i32( ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32 [[A:%.*]] to float ; CHECK-NEXT: [[TMP2:%.*]] = bitcast [[B:%.*]] to ; CHECK-NEXT: [[TMP3:%.*]] = call float @llvm.aarch64.sve.clastb.n.nxv4f32( [[PG:%.*]], float [[TMP1]], [[TMP2]]) ; CHECK-NEXT: [[TMP4:%.*]] = bitcast float [[TMP3]] to i32 ; CHECK-NEXT: ret i32 [[TMP4]] ; %out = call i32 @llvm.aarch64.sve.clastb.n.nxv4i32( %pg, i32 %a, %b) ret i32 %out } define i64 @clastb_n_i64( %pg, i64 %a, %b) { ; CHECK-LABEL: @clastb_n_i64( ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64 [[A:%.*]] to double ; CHECK-NEXT: [[TMP2:%.*]] = bitcast [[B:%.*]] to ; CHECK-NEXT: [[TMP3:%.*]] = call double @llvm.aarch64.sve.clastb.n.nxv2f64( [[PG:%.*]], double [[TMP1]], [[TMP2]]) ; CHECK-NEXT: [[TMP4:%.*]] = bitcast double [[TMP3]] to i64 ; CHECK-NEXT: ret i64 [[TMP4]] ; %out = call i64 @llvm.aarch64.sve.clastb.n.nxv2i64( %pg, i64 %a, %b) ret i64 %out } declare i16 @llvm.aarch64.sve.clastb.n.nxv8i16(, i16, ) declare i32 @llvm.aarch64.sve.clastb.n.nxv4i32(, i32, ) declare i64 @llvm.aarch64.sve.clastb.n.nxv2i64(, i64, )