[llvm] r306537 - [GlobalISel][X86] Test G_CONSTANT i32 0 TableGen'erated selection.NFC.

Igor Breger via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 05:43:21 PDT 2017


Author: ibreger
Date: Wed Jun 28 05:43:21 2017
New Revision: 306537

URL: http://llvm.org/viewvc/llvm-project?rev=306537&view=rev
Log:
[GlobalISel][X86] Test G_CONSTANT i32 0 TableGen'erated selection.NFC.

Modified:
    llvm/trunk/test/CodeGen/X86/GlobalISel/select-constant.mir

Modified: llvm/trunk/test/CodeGen/X86/GlobalISel/select-constant.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/GlobalISel/select-constant.mir?rev=306537&r1=306536&r2=306537&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/GlobalISel/select-constant.mir (original)
+++ llvm/trunk/test/CodeGen/X86/GlobalISel/select-constant.mir Wed Jun 28 05:43:21 2017
@@ -13,6 +13,10 @@
     ret i32 4
   }
 
+  define i32 @const_i32_0() {
+    ret i32 0
+  }
+
   define i64 @const_i64() {
     ret i64 68719476720
   }
@@ -82,6 +86,23 @@ body:             |
     %eax = COPY %0(s32)
     RET 0, implicit %eax
 
+...
+---
+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




More information about the llvm-commits mailing list