diff options
Diffstat (limited to 'test/CodeGen/JS/global-alias.ll')
-rw-r--r-- | test/CodeGen/JS/global-alias.ll | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/CodeGen/JS/global-alias.ll b/test/CodeGen/JS/global-alias.ll new file mode 100644 index 0000000000..b6efc0e7e7 --- /dev/null +++ b/test/CodeGen/JS/global-alias.ll @@ -0,0 +1,56 @@ +; RUN: llc -march=js < %s | FileCheck %s + +; Handle global aliases of various kinds. + +@pri = internal global [60 x i8] zeroinitializer +@pub = global [60 x i8] zeroinitializer + +@pri_int = alias internal [60 x i8]* @pri +@pri_wea = alias weak [60 x i8]* @pri +@pri_nor = alias [60 x i8]* @pri + +@pub_int = alias internal [60 x i8]* @pub +@pub_wea = alias weak [60 x i8]* @pub +@pub_nor = alias [60 x i8]* @pub + +; CHECK: test0( +; CHECK: return ([[PRI:[0-9]+]]|0); +define [60 x i8]* @test0() { + ret [60 x i8]* @pri +} +; CHECK: test1( +; CHECK: return ([[PRI]]|0); +define [60 x i8]* @test1() { + ret [60 x i8]* @pri_int +} +; CHECK: test2( +; CHECK: return ([[PRI]]|0); +define [60 x i8]* @test2() { + ret [60 x i8]* @pri_wea +} +; CHECK: test3( +; CHECK: return ([[PRI]]|0); +define [60 x i8]* @test3() { + ret [60 x i8]* @pri_nor +} + +; CHECK: test4( +; CHECK: return ([[PUB:[0-9]+]]|0); +define [60 x i8]* @test4() { + ret [60 x i8]* @pub +} +; CHECK: test5( +; CHECK: return ([[PUB]]|0); +define [60 x i8]* @test5() { + ret [60 x i8]* @pub_int +} +; CHECK: test6( +; CHECK: return ([[PUB]]|0); +define [60 x i8]* @test6() { + ret [60 x i8]* @pub_wea +} +; CHECK: test7( +; CHECK: return ([[PUB]]|0); +define [60 x i8]* @test7() { + ret [60 x i8]* @pub_nor +} |