diff options
author | Duncan Sands <baldrick@free.fr> | 2009-02-15 09:56:08 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-02-15 09:56:08 +0000 |
commit | b3f27881a9e796ac37a7b8bfc5d44af80a30bca9 (patch) | |
tree | 4661a49fc6e68ddb0d206c12106edadf1c7e6620 /llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll | |
parent | 2510436e20b761010cd2507cf3822cd36d4d799f (diff) | |
download | bcm5719-llvm-b3f27881a9e796ac37a7b8bfc5d44af80a30bca9.tar.gz bcm5719-llvm-b3f27881a9e796ac37a7b8bfc5d44af80a30bca9.zip |
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
Diffstat (limited to 'llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll')
-rw-r--r-- | llvm/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll | 10 |
1 files changed, 10 insertions, 0 deletions
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 +} |