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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 08:11:51 PDT 2024


================
@@ -0,0 +1,116 @@
+; RUN: opt < %s -passes='print<access-info>' -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s
+
+; REQUIRES: asserts
+
+
+define void @frexp_f64(ptr %in, ptr %out1, ptr %out2, i32 %N) {
+; CHECK: LAA: Allow to vectorize math function with write-only attribute: %call = tail call double @frexp
+entry:
+  %cmp4 = icmp sgt i32 %N, 0
+  br i1 %cmp4, label %for.body.preheader, label %for.cond.cleanup
+
+for.body.preheader:
+  %wide.trip.count = zext nneg i32 %N to i64
----------------
fhahn wrote:

this shouldn't be needed, please try to simplify the test cases

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


More information about the llvm-commits mailing list