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

Maciej Gabka via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 07:09:34 PDT 2024


================
@@ -2422,6 +2438,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI,
 
       // Save 'store' instructions. Abort if other instructions write to memory.
       if (I.mayWriteToMemory()) {
+        // We can safety handle math functions that have vectorized
+        // counterparts and have the memory write-only attribute set.
+        if (isMathLibCallMemWriteOnly(TLI, I)) {
+          LLVM_DEBUG(dbgs()
+                     << "LAA: allow math function with write-only attribute:"
----------------
mgabka wrote:

I think it is worth to edit this message a bit so it gives the full context in dbg output, what about:
"LAA: Allow to vectorize math function with write-only attribute:" ?

(also the dbg message start from capital letter)

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


More information about the cfe-commits mailing list