summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-01-29 18:31:35 +0000
committerLang Hames <lhames@gmail.com>2014-01-29 18:31:35 +0000
commit2cbbdf41c061fff572b354ac8549432709f1fe35 (patch)
tree0814b6bfe375ef3b720b5531f1f047cdf573df78 /llvm/test/ExecutionEngine
parent9e16c8ac8af288c739cb33bbb6e1bdf33043d60d (diff)
downloadbcm5719-llvm-2cbbdf41c061fff572b354ac8549432709f1fe35.tar.gz
bcm5719-llvm-2cbbdf41c061fff572b354ac8549432709f1fe35.zip
Add support for PC-relative non-extern relocations to RuntimeDyldMachO.
Also replaces testcase for r180790 (support for absolute non-externs relocs) with a more robust version. <rdar://problem/15864721> llvm-svn: 200404
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/MCJIT/non-extern-addend.ll22
1 files changed, 16 insertions, 6 deletions
diff --git a/llvm/test/ExecutionEngine/MCJIT/non-extern-addend.ll b/llvm/test/ExecutionEngine/MCJIT/non-extern-addend.ll
index 3a6e6344120..cf3ddea6b34 100644
--- a/llvm/test/ExecutionEngine/MCJIT/non-extern-addend.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/non-extern-addend.ll
@@ -1,12 +1,22 @@
; RUN: %lli_mcjit %s > /dev/null
+; RUN: %lli_mcjit -code-model=small %s > /dev/null
-define i32 @foo(i32 %X, i32 %Y, double %A) {
- %cond212 = fcmp ueq double %A, 2.000000e+00 ; <i1> [#uses=1]
- %cast110 = zext i1 %cond212 to i32 ; <i32> [#uses=1]
- ret i32 %cast110
+define i32 @foo(i32 %x, i32 %y, double %d) {
+entry:
+ %d.int64 = bitcast double %d to i64
+ %d.top64 = lshr i64 %d.int64, 32
+ %d.top = trunc i64 %d.top64 to i32
+ %d.bottom = trunc i64 %d.int64 to i32
+ %topCorrect = icmp eq i32 %d.top, 3735928559
+ %bottomCorrect = icmp eq i32 %d.bottom, 4277009102
+ %right = and i1 %topCorrect, %bottomCorrect
+ %nRight = xor i1 %right, true
+ %retVal = zext i1 %nRight to i32
+ ret i32 %retVal
}
define i32 @main() {
- %reg212 = call i32 @foo( i32 0, i32 1, double 1.000000e+00 ) ; <i32> [#uses=1]
- ret i32 %reg212
+entry:
+ %call = call i32 @foo(i32 0, i32 1, double 0xDEADBEEFFEEDFACE)
+ ret i32 %call
}
OpenPOWER on IntegriCloud