1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -fast-isel -mtriple=x86_64-unknown-unknown -mattr=+tbm | FileCheck %s --check-prefix=X64
4 ; NOTE: This should use IR equivalent to what is generated by clang/test/CodeGen/tbm-builtins.c
6 define i64 @test__bextri_u64(i64 %a0) {
7 ; X64-LABEL: test__bextri_u64:
9 ; X64-NEXT: bextrq $3841, %rdi, %rax # imm = 0xF01
11 %1 = call i64 @llvm.x86.tbm.bextri.u64(i64 %a0, i64 3841)
15 define i64 @test__blcfill_u64(i64 %a0) {
16 ; X64-LABEL: test__blcfill_u64:
18 ; X64-NEXT: leaq 1(%rdi), %rax
19 ; X64-NEXT: andq %rdi, %rax
26 define i64 @test__blci_u64(i64 %a0) {
27 ; X64-LABEL: test__blci_u64:
29 ; X64-NEXT: leaq 1(%rdi), %rax
30 ; X64-NEXT: xorq $-1, %rax
31 ; X64-NEXT: orq %rdi, %rax
39 define i64 @test__blcic_u64(i64 %a0) {
40 ; X64-LABEL: test__blcic_u64:
42 ; X64-NEXT: leaq 1(%rdi), %rax
43 ; X64-NEXT: xorq $-1, %rdi
44 ; X64-NEXT: andq %rdi, %rax
52 define i64 @test__blcmsk_u64(i64 %a0) {
53 ; X64-LABEL: test__blcmsk_u64:
55 ; X64-NEXT: leaq 1(%rdi), %rax
56 ; X64-NEXT: xorq %rdi, %rax
63 define i64 @test__blcs_u64(i64 %a0) {
64 ; X64-LABEL: test__blcs_u64:
66 ; X64-NEXT: leaq 1(%rdi), %rax
67 ; X64-NEXT: orq %rdi, %rax
74 define i64 @test__blsfill_u64(i64 %a0) {
75 ; X64-LABEL: test__blsfill_u64:
77 ; X64-NEXT: leaq -1(%rdi), %rax
78 ; X64-NEXT: orq %rdi, %rax
85 define i64 @test__blsic_u64(i64 %a0) {
86 ; X64-LABEL: test__blsic_u64:
88 ; X64-NEXT: leaq -1(%rdi), %rax
89 ; X64-NEXT: xorq $-1, %rdi
90 ; X64-NEXT: orq %rdi, %rax
98 define i64 @test__t1mskc_u64(i64 %a0) {
99 ; X64-LABEL: test__t1mskc_u64:
101 ; X64-NEXT: leaq 1(%rdi), %rax
102 ; X64-NEXT: xorq $-1, %rdi
103 ; X64-NEXT: orq %rdi, %rax
111 define i64 @test__tzmsk_u64(i64 %a0) {
112 ; X64-LABEL: test__tzmsk_u64:
114 ; X64-NEXT: leaq -1(%rdi), %rax
115 ; X64-NEXT: xorq $-1, %rdi
116 ; X64-NEXT: andq %rdi, %rax
124 declare i64 @llvm.x86.tbm.bextri.u64(i64, i64)