[PATCH] D113603: [x86] fold vector (X > -1) & Y to shift+andn

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 11 09:45:08 PST 2021


lebedev.ri added a comment.

Is there a test along the lines of

  define <4 x i1> @is_positive_mask_v4i1(<4 x i32> %x, <4 x i1> %y) {
    %cmp = icmp sgt <4 x i32> %x, <i32 -1, i32 -1, i32 -1, i32 -1>
    %and = and <4 x i1> %y, %cmp
    ret <4 x i1> %and
  }

?



================
Comment at: llvm/test/CodeGen/X86/vector-pcmp.ll:5
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX1
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefix=CHECK --check-prefix=AVX --check-prefix=AVX2
 
----------------
Worth adding some avx512 run lines, like in the next test file?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113603/new/

https://reviews.llvm.org/D113603



More information about the llvm-commits mailing list