summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Breger <igor.breger@intel.com>2017-06-28 12:43:21 +0000
committerIgor Breger <igor.breger@intel.com>2017-06-28 12:43:21 +0000
commit86cf07a32e28c9d86a181a3e5149a52ff7f76949 (patch)
treeae39815e4e9ed609546a65326e8a61174c183242
parent6710ba07c7ce84c4dbeb19d7dbbf1dada193e588 (diff)
downloadbcm5719-llvm-86cf07a32e28c9d86a181a3e5149a52ff7f76949.tar.gz
bcm5719-llvm-86cf07a32e28c9d86a181a3e5149a52ff7f76949.zip
[GlobalISel][X86] Test G_CONSTANT i32 0 TableGen'erated selection.NFC.
llvm-svn: 306537
-rw-r--r--llvm/test/CodeGen/X86/GlobalISel/select-constant.mir21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/GlobalISel/select-constant.mir b/llvm/test/CodeGen/X86/GlobalISel/select-constant.mir
index 7902a5084ce..4b91b5f9f09 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/select-constant.mir
+++ b/llvm/test/CodeGen/X86/GlobalISel/select-constant.mir
@@ -13,6 +13,10 @@
ret i32 4
}
+ define i32 @const_i32_0() {
+ ret i32 0
+ }
+
define i64 @const_i64() {
ret i64 68719476720
}
@@ -84,6 +88,23 @@ body: |
...
---
+name: const_i32_0
+# CHECK-LABEL: name: const_i32_0
+legalized: true
+regBankSelected: true
+# CHECK: registers:
+# CHECK-NEXT: - { id: 0, class: gr32, preferred-register: '' }
+registers:
+ - { id: 0, class: gpr }
+# CHECK: %0 = MOV32r0 implicit-def %eflags
+body: |
+ bb.1 (%ir-block.0):
+ %0(s32) = G_CONSTANT i32 0
+ %eax = COPY %0(s32)
+ RET 0, implicit %eax
+
+...
+---
name: const_i64
legalized: true
regBankSelected: true
OpenPOWER on IntegriCloud