[llvm] 71ed890 - [IVUsers] Precommit test for zext SCEV invalidation issue.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 15:26:07 PST 2022
Author: Florian Hahn
Date: 2022-12-27T23:24:21Z
New Revision: 71ed89041f325e7308cec3fa905b7b58a3bca718
URL: https://github.com/llvm/llvm-project/commit/71ed89041f325e7308cec3fa905b7b58a3bca718
DIFF: https://github.com/llvm/llvm-project/commit/71ed89041f325e7308cec3fa905b7b58a3bca718.diff
LOG: [IVUsers] Precommit test for zext SCEV invalidation issue.
Test case for issue reported by @uabelho and #59721
Added:
llvm/test/Analysis/IVUsers/zext-fold-cache-invalidation.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/Analysis/IVUsers/zext-fold-cache-invalidation.ll b/llvm/test/Analysis/IVUsers/zext-fold-cache-invalidation.ll
new file mode 100644
index 0000000000000..4e71f8cf358fe
--- /dev/null
+++ b/llvm/test/Analysis/IVUsers/zext-fold-cache-invalidation.ll
@@ -0,0 +1,21 @@
+; RUN: opt -verify-scev -passes='print<iv-users>' -disable-output %s | FileCheck %s
+
+; XFAIL: *
+
+target datalayout = "n16"
+
+define i16 @zext_cache_invalidation_1(i1 %c) {
+entry:
+ br i1 false, label %loop, label %exit
+
+loop:
+ %iv = phi i16 [ -3, %entry ], [ %iv.next, %loop ]
+ %iv.ext = zext i16 %iv to i32
+ %iv.inc = add i32 %iv.ext, 4
+ %iv.next = trunc i32 %iv.inc to i16
+ %cond = icmp ult i16 %iv.next, 51
+ br i1 %cond, label %loop, label %exit
+
+exit:
+ ret i16 0
+}
More information about the llvm-commits
mailing list