summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-08-01 23:21:21 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-08-01 23:21:21 +0000
commite52646cd802fa38471bfed3740ab3377d9da0687 (patch)
treef03a0ba7674af39ca1484e08e768a9339692a134 /llvm/test
parent3da117d272079f9dd1937856df3fcd1698803c98 (diff)
downloadbcm5719-llvm-e52646cd802fa38471bfed3740ab3377d9da0687.tar.gz
bcm5719-llvm-e52646cd802fa38471bfed3740ab3377d9da0687.zip
PartiallyInlineLibCalls: Check sqrt result type before transforming it.
Some configure scripts declare this with the wrong prototype, which can lead to an assertion failure. llvm-svn: 214593
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/PartiallyInlineLibCalls/bad-prototype.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Transforms/PartiallyInlineLibCalls/bad-prototype.ll b/llvm/test/Transforms/PartiallyInlineLibCalls/bad-prototype.ll
new file mode 100644
index 00000000000..34cd672ed26
--- /dev/null
+++ b/llvm/test/Transforms/PartiallyInlineLibCalls/bad-prototype.ll
@@ -0,0 +1,13 @@
+; RUN: opt -S -partially-inline-libcalls < %s | FileCheck %s
+
+target triple = "x86_64-unknown-linux-gnu"
+
+declare i32 @sqrt()
+
+; CHECK-LABEL: @foo
+define i32 @foo() {
+ ; CHECK: call{{.*}}@sqrt
+ ; CHECK-NOT: call{{.*}}@sqrt
+ %r = call i32 @sqrt()
+ ret i32 %r
+}
OpenPOWER on IntegriCloud