[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

Paschalis Mpeis via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 30 06:56:24 PDT 2024


================
@@ -0,0 +1,117 @@
+; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+target triple = "aarch64-unknown-linux-gnu"
+
+; TODO: add mappings for frexp/frexpf
----------------
paschalis-mpeis wrote:


It turns out without the mappings LV Legality does not let it vectorize earlier ([here](https://github.com/llvm/llvm-project/blob/eaf0d82529f30fd53b453886676821d67ccfe9af/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp#L900)):
> LV: Not vectorizing: Found a non-intrinsic callsite   %call = tail call float @frexpf(float noundef %0, ptr noundef %add.ptr)
> ..
>LV: Not vectorizing: Cannot prove legality

I will keep the those LAA frexp/frexpf tests, but I'll convert TODO's in a similar fashion with the [next comment](https://github.com/llvm/llvm-project/pull/78432#discussion_r1581031468).


https://github.com/llvm/llvm-project/pull/78432


More information about the cfe-commits mailing list