[PATCH] D157968: [NFC][AArch64][LV] Reorganise tests for using SLEEF symbols in LV.

mgabka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 06:10:39 PDT 2023


mgabka added a comment.

please apply my comments to sleef-intrinsic-calls-aarch64.ll also to the sleef-calls-aarch64.ll



================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sleef-intrinsic-calls-aarch64.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; Do NOT use -O3. It will lower exp2 to ldexp, and the test will fail.
----------------
this is not true, however I realised that these tests can be generated when you use a --filter regexp option, for example --filter "(ceil)|(copysign)|(cos)|....", and I think that would be my preferred form to generate check lines, as it will be easy to regenerate them.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sleef-intrinsic-calls-aarch64.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
+; Do NOT use -O3. It will lower exp2 to ldexp, and the test will fail.
+; RUN: opt -vector-library=sleefgnuabi -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s --check-prefixes=CHECK,NEON
----------------
this comment is redundant, please remove it.
In such tests we should always only use the min required nr of passes.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sleef-intrinsic-calls-aarch64.ll:3
+; Do NOT use -O3. It will lower exp2 to ldexp, and the test will fail.
+; RUN: opt -vector-library=sleefgnuabi -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s --check-prefixes=CHECK,NEON
+; RUN: opt -mattr=+sve -vector-library=sleefgnuabi -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s --check-prefixes=CHECK,SVE
----------------
please also use "-force-vector-interleave=1" to disable interleaving and reduce the number of generated checks, same applies to the other run line


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sleef-intrinsic-calls-aarch64.ll:13
+
+declare double @llvm.ceil.f64(double) #0
+declare float @llvm.ceil.f32(float) #0
----------------
this attribute is never defined, so it is not used, please remove its all occurrences.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157968



More information about the llvm-commits mailing list