Testcase for PR1678.
authorDuncan Sands <baldrick@free.fr>
Thu, 20 Sep 2007 18:56:24 +0000 (18:56 +0000)
committerDuncan Sands <baldrick@free.fr>
Thu, 20 Sep 2007 18:56:24 +0000 (18:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42171 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll b/test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll
new file mode 100644 (file)
index 0000000..300edd5
--- /dev/null
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep icmp
+; PR1678
+
+@A = alias weak void ()* @B            ; <void ()*> [#uses=1]
+
+declare extern_weak void @B()
+
+define i32 @active() {
+entry:
+       %"alloca point" = bitcast i32 0 to i32          ; <i32> [#uses=0]
+       %tmp1 = icmp ne void ()* @A, null               ; <i1> [#uses=1]
+       %tmp12 = zext i1 %tmp1 to i32           ; <i32> [#uses=1]
+       ret i32 %tmp12
+}