diff options
author | Justin Lebar <jlebar@google.com> | 2016-01-23 21:12:20 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-01-23 21:12:20 +0000 |
commit | 3a5f5798a14e3d923cec8432a42986c93e2f2e76 (patch) | |
tree | ea8c25a86046f84222ccadedd917b37936374641 /llvm/test/CodeGen/NVPTX | |
parent | 2a161f986fb063183284e1db30d3af2ea04c463c (diff) | |
download | bcm5719-llvm-3a5f5798a14e3d923cec8432a42986c93e2f2e76.tar.gz bcm5719-llvm-3a5f5798a14e3d923cec8432a42986c93e2f2e76.zip |
[CUDA] Die gracefully when trying to output an LLVM alias.
Summary:
Previously, we would just output "foo = bar" in the assembly, and then
ptxas would choke. Now we die before emitting any invalid code.
Reviewers: echristo
Subscribers: jholewinski, llvm-commits, jhen, tra
Differential Revision: http://reviews.llvm.org/D16490
llvm-svn: 258638
Diffstat (limited to 'llvm/test/CodeGen/NVPTX')
-rw-r--r-- | llvm/test/CodeGen/NVPTX/alias.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/alias.ll b/llvm/test/CodeGen/NVPTX/alias.ll new file mode 100644 index 00000000000..a2785192769 --- /dev/null +++ b/llvm/test/CodeGen/NVPTX/alias.ll @@ -0,0 +1,7 @@ +; RUN: not llc < %s -march=nvptx -mcpu=sm_20 2>&1 | FileCheck %s + +; Check that llc dies gracefully when given an alias. + +define i32 @a() { ret i32 0 } +; CHECK: ERROR: Module has aliases +@b = internal alias i32 (), i32 ()* @a |