[llvm] Update the base and index value for masked gather (PR #130920)
Rohit Aggarwal via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 12 22:54:56 PDT 2025
================
@@ -0,0 +1,37 @@
+; RUN: llc -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq -mcpu=znver5 < %s | FileCheck %s
+; RUN: llc -update-baseIndex -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq -mcpu=znver5 < %s | FileCheck %s
+; RUN: llc -update-baseIndex=false -mtriple=x86_64-unknown-unknown -mattr=+avx512f,+avx512bw,+avx512vl,+avx512dq -mcpu=znver5 < %s | FileCheck %s -check-prefix=OLD
+
+%struct.pt = type { float, float, float, i32 }
+
+; CHECK-LABEL: test_gather_16f32_1:
+; CHECK: vgatherdps
+
+; OLD-LABEL: test_gather_16f32_1:
+; OLD: vgatherqps
+; OLD: vgatherqps
+
+define <16 x float> @test_gather_16f32_1(ptr %x, ptr %arr, <16 x i1> %mask, <16 x float> %src0) {
+ %wide.load = load <16 x i32>, ptr %arr, align 4
+ %4 = and <16 x i32> %wide.load, <i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911, i32 536870911>
----------------
rohitaggarwal007 wrote:
Done
https://github.com/llvm/llvm-project/pull/130920
More information about the llvm-commits
mailing list