r273086 - [X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Sat Jun 18 10:09:40 PDT 2016
Author: rksimon
Date: Sat Jun 18 12:09:40 2016
New Revision: 273086
URL: http://llvm.org/viewvc/llvm-project?rev=273086&view=rev
Log:
[X86][TBM] Refreshed builtin tests ready for creation of llvm fast-isel tests
Modified:
cfe/trunk/test/CodeGen/tbm-builtins.c
Modified: cfe/trunk/test/CodeGen/tbm-builtins.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/tbm-builtins.c?rev=273086&r1=273085&r2=273086&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/tbm-builtins.c (original)
+++ cfe/trunk/test/CodeGen/tbm-builtins.c Sat Jun 18 12:09:40 2016
@@ -8,46 +8,56 @@
#include <x86intrin.h>
+// NOTE: This should match the tests in llvm/test/CodeGen/X86/tbm-intrinsics-fast-isel.ll
+
unsigned int test__bextri_u32(unsigned int a) {
- // CHECK: call i32 @llvm.x86.tbm.bextri.u32
+ // CHECK-LABEL: test__bextri_u32
+ // CHECK: call i32 @llvm.x86.tbm.bextri.u32(i32 %{{.*}}, i32 1)
return __bextri_u32(a, 1);
}
unsigned long long test__bextri_u64(unsigned long long a) {
- // CHECK: call i64 @llvm.x86.tbm.bextri.u64
+ // CHECK-LABEL: test__bextri_u64
+ // CHECK: call i64 @llvm.x86.tbm.bextri.u64(i64 %{{.*}}, i64 2)
return __bextri_u64(a, 2);
}
unsigned long long test__bextri_u64_bigint(unsigned long long a) {
- // CHECK: call i64 @llvm.x86.tbm.bextri.u64
+ // CHECK-LABEL: test__bextri_u64_bigint
+ // CHECK: call i64 @llvm.x86.tbm.bextri.u64(i64 %{{.*}}, i64 549755813887)
return __bextri_u64(a, 0x7fffffffffLL);
}
unsigned int test__blcfill_u32(unsigned int a) {
+ // CHECK-LABEL: test__blcfill_u32
// CHECK: [[TMP:%.*]] = add i32 [[SRC:%.*]], 1
// CHECK-NEXT: %{{.*}} = and i32 [[TMP]], [[SRC]]
return __blcfill_u32(a);
}
unsigned long long test__blcfill_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blcfill_u64
// CHECK: [[TMPT:%.*]] = add i64 [[SRC:%.*]], 1
// CHECK-NEXT: %{{.*}} = and i64 [[TMP]], [[SRC]]
return __blcfill_u64(a);
}
unsigned int test__blci_u32(unsigned int a) {
+ // CHECK-LABEL: test__blci_u32
// CHECK: [[TMP:%.*]] = sub i32 -2, [[SRC:%.*]]
// CHECK-NEXT: %{{.*}} = or i32 [[TMP]], [[SRC]]
return __blci_u32(a);
}
unsigned long long test__blci_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blci_u64
// CHECK: [[TMP:%.*]] = sub i64 -2, [[SRC:%.*]]
// CHECK-NEXT: %{{.*}} = or i64 [[TMP]], [[SRC]]
return __blci_u64(a);
}
unsigned int test__blcic_u32(unsigned int a) {
+ // CHECK-LABEL: test__blcic_u32
// CHECK: [[TMP1:%.*]] = xor i32 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i32 [[SRC]], 1
// CHECK-NEXT: {{.*}} = and i32 [[TMP2]], [[TMP1]]
@@ -55,6 +65,7 @@ unsigned int test__blcic_u32(unsigned in
}
unsigned long long test__blcic_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blcic_u64
// CHECK: [[TMP1:%.*]] = xor i64 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i64 [[SRC]], 1
// CHECK-NEXT: {{.*}} = and i64 [[TMP2]], [[TMP1]]
@@ -62,42 +73,49 @@ unsigned long long test__blcic_u64(unsig
}
unsigned int test__blcmsk_u32(unsigned int a) {
+ // CHECK-LABEL: test__blcmsk_u32
// CHECK: [[TMP:%.*]] = add i32 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = xor i32 [[TMP]], [[SRC]]
return __blcmsk_u32(a);
}
unsigned long long test__blcmsk_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blcmsk_u64
// CHECK: [[TMP:%.*]] = add i64 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = xor i64 [[TMP]], [[SRC]]
return __blcmsk_u64(a);
}
unsigned int test__blcs_u32(unsigned int a) {
+ // CHECK-LABEL: test__blcs_u32
// CHECK: [[TMP:%.*]] = add i32 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = or i32 [[TMP]], [[SRC]]
return __blcs_u32(a);
}
unsigned long long test__blcs_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blcs_u64
// CHECK: [[TMP:%.*]] = add i64 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = or i64 [[TMP]], [[SRC]]
return __blcs_u64(a);
}
unsigned int test__blsfill_u32(unsigned int a) {
+ // CHECK-LABEL: test__blsfill_u32
// CHECK: [[TMP:%.*]] = add i32 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = or i32 [[TMP]], [[SRC]]
return __blsfill_u32(a);
}
unsigned long long test__blsfill_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blsfill_u64
// CHECK: [[TMP:%.*]] = add i64 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = or i64 [[TMP]], [[SRC]]
return __blsfill_u64(a);
}
unsigned int test__blsic_u32(unsigned int a) {
+ // CHECK-LABEL: test__blsic_u32
// CHECK: [[TMP1:%.*]] = xor i32 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i32 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = or i32 [[TMP2]], [[TMP1]]
@@ -105,6 +123,7 @@ unsigned int test__blsic_u32(unsigned in
}
unsigned long long test__blsic_u64(unsigned long long a) {
+ // CHECK-LABEL: test__blsic_u64
// CHECK: [[TMP1:%.*]] = xor i64 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i64 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = or i64 [[TMP2]], [[TMP1]]
@@ -112,6 +131,7 @@ unsigned long long test__blsic_u64(unsig
}
unsigned int test__t1mskc_u32(unsigned int a) {
+ // CHECK-LABEL: test__t1mskc_u32
// CHECK: [[TMP1:%.*]] = xor i32 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i32 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = or i32 [[TMP2]], [[TMP1]]
@@ -119,6 +139,7 @@ unsigned int test__t1mskc_u32(unsigned i
}
unsigned long long test__t1mskc_u64(unsigned long long a) {
+ // CHECK-LABEL: test__t1mskc_u64
// CHECK: [[TMP1:%.*]] = xor i64 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i64 [[SRC:%.*]], 1
// CHECK-NEXT: {{.*}} = or i64 [[TMP2]], [[TMP1]]
@@ -126,6 +147,7 @@ unsigned long long test__t1mskc_u64(unsi
}
unsigned int test__tzmsk_u32(unsigned int a) {
+ // CHECK-LABEL: test__tzmsk_u32
// CHECK: [[TMP1:%.*]] = xor i32 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i32 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = and i32 [[TMP2]], [[TMP1]]
@@ -133,6 +155,7 @@ unsigned int test__tzmsk_u32(unsigned in
}
unsigned long long test__tzmsk_u64(unsigned long long a) {
+ // CHECK-LABEL: test__tzmsk_u64
// CHECK: [[TMP1:%.*]] = xor i64 [[SRC:%.*]], -1
// CHECK-NEXT: [[TMP2:%.*]] = add i64 [[SRC:%.*]], -1
// CHECK-NEXT: {{.*}} = and i64 [[TMP2]], [[TMP1]]
More information about the cfe-commits
mailing list