diff options
author | Artem Belevich <tra@google.com> | 2018-12-14 23:53:06 +0000 |
---|---|---|
committer | Artem Belevich <tra@google.com> | 2018-12-14 23:53:06 +0000 |
commit | 6d74bd638a85cc17f3d5784e41d3d0162aad787c (patch) | |
tree | 269877470449e781038898cc5fa970204fba1e8d /llvm/test/CodeGen/NVPTX | |
parent | f5f62908994de1da3633bbeedb316d1e7353ff02 (diff) | |
download | bcm5719-llvm-6d74bd638a85cc17f3d5784e41d3d0162aad787c.tar.gz bcm5719-llvm-6d74bd638a85cc17f3d5784e41d3d0162aad787c.zip |
[NVPTX] Lower instructions that expand into libcalls.
The change is an effort to split and refactor abandoned
D34708 into smaller parts.
Here the behaviour of unsupported instructions is changed
to match the behaviour of explicit intrinsics calls.
Currently LLVM crashes with:
> Assertion getInstruction() && "Not a call or invoke instruction!" failed.
With this patch LLVM produces a more sensible error message:
> Cannot select: ... i32 = ExternalSymbol'__foobar'
Author: Denys Zariaiev <denys.zariaiev@gmail.com>
Differential Revision: https://reviews.llvm.org/D55145
llvm-svn: 349213
Diffstat (limited to 'llvm/test/CodeGen/NVPTX')
-rw-r--r-- | llvm/test/CodeGen/NVPTX/libcall-instruction.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/NVPTX/libcall-instruction.ll b/llvm/test/CodeGen/NVPTX/libcall-instruction.ll new file mode 100644 index 00000000000..0c2cab7eaa5 --- /dev/null +++ b/llvm/test/CodeGen/NVPTX/libcall-instruction.ll @@ -0,0 +1,8 @@ +; RUN: not llc < %s -march=nvptx 2>&1 | FileCheck %s +; used to panic on failed assetion and now fails with a "Cannot select" + +; CHECK: LLVM ERROR: Cannot select: {{t28|0x[0-9a-f]+}}: i32 = ExternalSymbol'__umodti3' +define hidden i128 @remainder(i128, i128) { + %3 = urem i128 %0, %1 + ret i128 %3 +} |