[llvm] 2717d98 - [GlobalIsel][X86] legalize-select.mir - add x86-64 test coverage
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 02:39:17 PDT 2023
Author: Simon Pilgrim
Date: 2023-06-09T10:36:32+01:00
New Revision: 2717d98a1e358033e409aeabba1072d499cea161
URL: https://github.com/llvm/llvm-project/commit/2717d98a1e358033e409aeabba1072d499cea161
DIFF: https://github.com/llvm/llvm-project/commit/2717d98a1e358033e409aeabba1072d499cea161.diff
LOG: [GlobalIsel][X86] legalize-select.mir - add x86-64 test coverage
Added:
Modified:
llvm/test/CodeGen/X86/GlobalISel/legalize-select.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/GlobalISel/legalize-select.mir b/llvm/test/CodeGen/X86/GlobalISel/legalize-select.mir
index e8714d3844b53..1a29014246d3c 100644
--- a/llvm/test/CodeGen/X86/GlobalISel/legalize-select.mir
+++ b/llvm/test/CodeGen/X86/GlobalISel/legalize-select.mir
@@ -1,5 +1,6 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
-# RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s
+# RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefixes=CHECK,X86
+# RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefixes=CHECK,X64
# test select
@@ -28,18 +29,26 @@ body: |
name: test_select64
body: |
bb.1:
- ; CHECK-LABEL: name: test_select64
- ; CHECK: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
- ; CHECK-NEXT: [[DEF1:%[0-9]+]]:_(s64) = IMPLICIT_DEF
- ; CHECK-NEXT: [[DEF2:%[0-9]+]]:_(s1) = IMPLICIT_DEF
- ; CHECK-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](s64)
- ; CHECK-NEXT: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](s64)
- ; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[DEF2]](s1)
- ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ZEXT]](s32), [[UV]], [[UV2]]
- ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ZEXT]](s32), [[UV1]], [[UV3]]
- ; CHECK-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[SELECT]](s32), [[SELECT1]](s32)
- ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[MV]](s64)
- ; CHECK-NEXT: RET 0, implicit [[COPY]](s64)
+ ; X86-LABEL: name: test_select64
+ ; X86: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
+ ; X86-NEXT: [[DEF1:%[0-9]+]]:_(s64) = IMPLICIT_DEF
+ ; X86-NEXT: [[DEF2:%[0-9]+]]:_(s1) = IMPLICIT_DEF
+ ; X86-NEXT: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF1]](s64)
+ ; X86-NEXT: [[UV2:%[0-9]+]]:_(s32), [[UV3:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[DEF]](s64)
+ ; X86-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[DEF2]](s1)
+ ; X86-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ZEXT]](s32), [[UV]], [[UV2]]
+ ; X86-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ZEXT]](s32), [[UV1]], [[UV3]]
+ ; X86-NEXT: [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[SELECT]](s32), [[SELECT1]](s32)
+ ; X86-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[MV]](s64)
+ ; X86-NEXT: RET 0, implicit [[COPY]](s64)
+ ; X64-LABEL: name: test_select64
+ ; X64: [[DEF:%[0-9]+]]:_(s64) = IMPLICIT_DEF
+ ; X64-NEXT: [[DEF1:%[0-9]+]]:_(s64) = IMPLICIT_DEF
+ ; X64-NEXT: [[DEF2:%[0-9]+]]:_(s1) = IMPLICIT_DEF
+ ; X64-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[DEF2]](s1)
+ ; X64-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[ZEXT]](s32), [[DEF1]], [[DEF]]
+ ; X64-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[SELECT]](s64)
+ ; X64-NEXT: RET 0, implicit [[COPY]](s64)
%0:_(s64) = IMPLICIT_DEF
%1:_(s64) = IMPLICIT_DEF
%2:_(s1) = IMPLICIT_DEF
More information about the llvm-commits
mailing list