[llvm] Precommit testcase for pr81872 (PR #84782)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 09:18:31 PDT 2024


================
@@ -0,0 +1,109 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt -S -passes=loop-vectorize < %s | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+ at global = external global ptr addrspace(1), align 8
+
+; PR 81872 explains the issue.
+
+; If we vectorize, we have a miscompile where array IV and thereby value stored in (arr[99],
+; arr[98]) is calculated incorrectly since disjoint or was only disjoint because
+; of dominating conditions. Dropping the disjoint to avoid poison still changes
+; the behaviour since now the or is no longer equivalent to the add.
+; Function Attrs: uwtable
----------------
fhahn wrote:

Nit: not needed, replace by `;` 

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


More information about the llvm-commits mailing list