aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-12-20 11:34:06 -0500
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-12-22 17:14:38 -0500
commit2c5ffa179c9e257ad7c87d0b8f18b9d63ce1a4fe (patch)
tree9c74147391358d194090ddfddc838a89ede07032
parentad6b5762b64f6706cb4d1bcad383c373736b5af6 (diff)
downloadllvm-2c5ffa179c9e257ad7c87d0b8f18b9d63ce1a4fe.zip
llvm-2c5ffa179c9e257ad7c87d0b8f18b9d63ce1a4fe.tar.gz
llvm-2c5ffa179c9e257ad7c87d0b8f18b9d63ce1a4fe.tar.bz2
SCCP: Add failing testcase with llvm.ssa.copy
-rw-r--r--llvm/test/Transforms/SCCP/issue59661-missing-predicate-info-for-ssa-copy.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SCCP/issue59661-missing-predicate-info-for-ssa-copy.ll b/llvm/test/Transforms/SCCP/issue59661-missing-predicate-info-for-ssa-copy.ll
new file mode 100644
index 0000000..564fe95
--- /dev/null
+++ b/llvm/test/Transforms/SCCP/issue59661-missing-predicate-info-for-ssa-copy.ll
@@ -0,0 +1,21 @@
+; REQUIRES: asserts
+; XFAIL: *
+; RUN: opt -S -passes=ipsccp < %s
+
+; https://github.com/llvm/llvm-project/issues/59661
+
+define i32 @bar() {
+entry:
+ %call = call i32 @foo()
+ ret i32 0
+}
+
+define internal i32 @foo() {
+entry:
+ %arst = call ptr @llvm.ssa.copy.p0(ptr @foo)
+ ret i32 0
+}
+
+declare ptr @llvm.ssa.copy.p0(ptr) #0
+
+attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }