From b3f27881a9e796ac37a7b8bfc5d44af80a30bca9 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 15 Feb 2009 09:56:08 +0000 Subject: If the target of an alias has internal linkage, then the alias can be morphed into the target. Implement this transform, and fix a crash in the existing transform at the same time. llvm-svn: 64583 --- llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll (limited to 'llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll') diff --git a/llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll b/llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll new file mode 100644 index 00000000000..e59c8df5570 --- /dev/null +++ b/llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll @@ -0,0 +1,10 @@ +; RUN: llvm-as < %s | opt -globalopt + +@g = external global i32 + +@a = alias bitcast (i32* @g to i8*) + +define void @f() { + %tmp = load i8* @a + ret void +} -- cgit v1.2.3