28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=instcombine < %s | FileCheck %s3 4target triple = "aarch64-unknown-linux-gnu"5 6define <vscale x 4 x i32> @replace_sel_intrinsic(<vscale x 4 x i1> %p, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) #0 {7; CHECK-LABEL: @replace_sel_intrinsic(8; CHECK-NEXT: [[TMP1:%.*]] = select <vscale x 4 x i1> [[P:%.*]], <vscale x 4 x i32> [[A:%.*]], <vscale x 4 x i32> [[B:%.*]]9; CHECK-NEXT: ret <vscale x 4 x i32> [[TMP1]]10;11 %1 = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sel.nxv4i32(<vscale x 4 x i1> %p, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b)12 ret <vscale x 4 x i32> %113}14 15define <vscale x 4 x i32> @sel_ptrue(<vscale x 4 x i32> %a, <vscale x 4 x i32> %b) {16; CHECK-LABEL: @sel_ptrue(17; CHECK-NEXT: ret <vscale x 4 x i32> [[A:%.*]]18;19 %pred = call <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32 31)20 %res = call <vscale x 4 x i32> @llvm.aarch64.sve.sel.nxv4i32(<vscale x 4 x i1> %pred, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b)21 ret <vscale x 4 x i32> %res22}23 24declare <vscale x 4 x i1> @llvm.aarch64.sve.ptrue.nxv4i1(i32)25declare <vscale x 4 x i32> @llvm.aarch64.sve.sel.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>)26 27attributes #0 = { "target-features"="+sve" }28