summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll')
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll b/llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll
new file mode 100644
index 00000000000..c03d1af532d
--- /dev/null
+++ b/llvm/test/CodeGen/X86/GlobalISel/inttoptr.ll
@@ -0,0 +1,12 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=CHECK
+
+define i64* @inttoptr_p0_s64(i64 %val) {
+; CHECK-LABEL: inttoptr_p0_s64:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: movq %rdi, %rax
+; CHECK-NEXT: retq
+entry:
+ %0 = inttoptr i64 %val to i64*
+ ret i64* %0
+}
OpenPOWER on IntegriCloud