[llvm] [LV] Disable fold tail by masking - when induction vars used outside (PR #81609)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 09:59:06 PST 2024
================
@@ -0,0 +1,85 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=loop-vectorize -S | FileCheck %s
+
+
+; #include <stdio.h>
+; #define SIZE 17
+;
+; unsigned char result;
+; unsigned char arr_1[SIZE];
+;
+; __attribute__((__noinline__))
+; void test(int limit, unsigned char val, int arr_2[SIZE][SIZE][SIZE]) {
+; #pragma clang loop vectorize_predicate(enable)
+; for (short i_5 = 0; i_5 < limit; i_5++) {
+; arr_1 [i_5] = val;
+; result = arr_2[0][0][i_5] != arr_2[i_5][i_5][0];
+; }
+; }
+;
+;int main(void) {
+; int arr_2[SIZE][SIZE][SIZE];
+;
+; __builtin_memset(arr_2, 1, sizeof(arr_2));
----------------
fhahn wrote:
Usually we don't include C/C++ source code, as the IR usually needs to stand on its own. Below are a few suggestions to further simplify the IR and make it more readable.
It would be helpful if you could instead a brief comment explaining the issue.
https://github.com/llvm/llvm-project/pull/81609
More information about the llvm-commits
mailing list