diff options
author | Nikita Popov <npopov@redhat.com> | 2023-12-20 14:52:34 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2023-12-20 14:53:25 +0100 |
commit | 3dd2db08a2b30618e21f165cf094de421dc32c00 (patch) | |
tree | 4e5ead16cbac23e1e3346296670173befebd0188 | |
parent | e86a02ce89c33f3fa4061fb4c67c3b05c69a72ab (diff) | |
download | llvm-3dd2db08a2b30618e21f165cf094de421dc32c00.zip llvm-3dd2db08a2b30618e21f165cf094de421dc32c00.tar.gz llvm-3dd2db08a2b30618e21f165cf094de421dc32c00.tar.bz2 |
[MergeFunc] Add another test for incorrect constexpr merging (NFC)
Looks like we don't even check the opcode :(
-rw-r--r-- | llvm/test/Transforms/MergeFunc/constexpr.ll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/Transforms/MergeFunc/constexpr.ll b/llvm/test/Transforms/MergeFunc/constexpr.ll index 9997c5c..9999caf 100644 --- a/llvm/test/Transforms/MergeFunc/constexpr.ll +++ b/llvm/test/Transforms/MergeFunc/constexpr.ll @@ -11,6 +11,7 @@ ; CHECK: @f4 = unnamed_addr alias ptr (), ptr @f3 ; CHECK: @f5 = unnamed_addr alias ptr (), ptr @f3 ; CHECK: @f7 = unnamed_addr alias i64 (), ptr @f6 +; CHECK: @f8 = unnamed_addr alias i64 (), ptr @f6 ;. define i1 @f1() unnamed_addr { ; CHECK-LABEL: define i1 @f1() unnamed_addr { @@ -48,3 +49,7 @@ define i64 @f6() unnamed_addr { define i64 @f7() unnamed_addr { ret i64 add (i64 ptrtoint (ptr @g1 to i64), i64 1) } + +define i64 @f8() unnamed_addr { + ret i64 sub (i64 ptrtoint (ptr @g1 to i64), i64 1) +} |