diff options
author | Jay Foad <jay.foad@gmail.com> | 2012-05-12 08:30:16 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2012-05-12 08:30:16 +0000 |
commit | b7454fd9df0b477e3daf2fce6e1d5e1b241562df (patch) | |
tree | bb926d40337ccaa32dd4cc1e7318545ec34add08 /test/Transforms/GlobalOpt | |
parent | 2b38c12643236825a6a49c31ef49da8e62b094c2 (diff) | |
download | external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.zip external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.tar.gz external_llvm-b7454fd9df0b477e3daf2fce6e1d5e1b241562df.tar.bz2 |
Teach Function::hasAddressTaken that BlockAddress doesn't really take
the address of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156703 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r-- | test/Transforms/GlobalOpt/2012-05-11-blockaddress.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/Transforms/GlobalOpt/2012-05-11-blockaddress.ll b/test/Transforms/GlobalOpt/2012-05-11-blockaddress.ll new file mode 100644 index 0000000..0c58c1a --- /dev/null +++ b/test/Transforms/GlobalOpt/2012-05-11-blockaddress.ll @@ -0,0 +1,16 @@ +; RUN: opt < %s -globalopt -S | FileCheck %s +; Check that the mere presence of a blockaddress doesn't prevent -globalopt +; from promoting @f to fastcc. + +; CHECK: define{{.*}}fastcc{{.*}}@f +define internal i8* @f() { + ret i8* blockaddress(@f, %L1) +L1: + ret i8* null +} + +define void @g() { + ; CHECK: call{{.*}}fastcc{{.*}}@f + %p = call i8* @f() + ret void +} |