;=========================== begin_copyright_notice ============================ ; ; Copyright (C) 2024 Intel Corporation ; ; SPDX-License-Identifier: MIT ; ;============================ end_copyright_notice ============================= ; REQUIRES: opaque-pointers ; RUN: opt -passes=cmsimdcflowering -S < %s | FileCheck %s @Rcp_T2 = internal global <64 x i32> undef ; CHECK: @EM = internal global <32 x i1> define dso_local dllexport void @test(<32 x i16> %mask, <32 x i32> %addrs) { %Rcp_T = alloca <64 x i32>, align 512 %cmp = icmp ne <32 x i16> %mask, zeroinitializer %call = call i1 @llvm.genx.simdcf.any.v32i1(<32 x i1> %cmp) br i1 %call, label %if.then, label %if.end ; CHECK-LABEL: if.then: if.then: ; CHECK: [[EM_LOAD1:%.*]] = load <32 x i1>, ptr @EM ; CHECK-NEXT: [[CALL1:%.*]] = call <64 x i32> @llvm.genx.gather4.masked.scaled2.v64i32.v32i32.v32i1(i32 12, i16 0, i32 254, i32 0, <32 x i32> %addrs, <32 x i1> [[EM_LOAD1]]) %call1 = call <64 x i32> @llvm.genx.gather4.masked.scaled2.v64i32.v32i32.v32i1(i32 12, i16 0, i32 254, i32 0, <32 x i32> %addrs, <32 x i1> ) ; CHECK: [[EM_LOAD2:%.*]] = load <32 x i1>, ptr @EM ; CHECK-NEXT: [[CHENNELEM:%.*]] = shufflevector <32 x i1> [[EM_LOAD2]], <32 x i1> undef, <64 x i32> ; CHECK-NEXT: [[CALL1_SIMDCFPREDL:%.*]] = select <64 x i1> [[CHENNELEM]], <64 x i32> [[CALL1]] store <64 x i32> %call1, ptr %Rcp_T br label %if.end if.end: %ld = load <64 x i32>, ptr %Rcp_T store <64 x i32> %ld, ptr @Rcp_T2 ret void } declare <64 x i32> @llvm.genx.gather4.masked.scaled2.v64i32.v32i32.v32i1(i32, i16, i32, i32, <32 x i32>, <32 x i1>) declare i1 @llvm.genx.simdcf.any.v32i1(<32 x i1>)