xref: /aosp_15_r20/external/llvm/test/CodeGen/X86/function-subtarget-features-2.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 -filetype=obj -o - | llvm-objdump -d - | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; This test verifies that we assemble code for different architectures
4*9880d681SAndroid Build Coastguard Worker; based on target-cpu and target-features attributes.
5*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void @foo() #0 {
8*9880d681SAndroid Build Coastguard Workerentry:
9*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "aeskeygenassist  $$0x4, %xmm0, %xmm1", "~{dirflag},~{fpsr},~{flags}"()
10*9880d681SAndroid Build Coastguard Worker  ret void
11*9880d681SAndroid Build Coastguard Worker}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker; CHECK: foo
14*9880d681SAndroid Build Coastguard Worker; CHECK: aeskeygenassist
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Workerdefine void @bar() #2 {
17*9880d681SAndroid Build Coastguard Workerentry:
18*9880d681SAndroid Build Coastguard Worker  call void asm sideeffect "crc32b 4(%rbx), %eax", "~{dirflag},~{fpsr},~{flags}"()
19*9880d681SAndroid Build Coastguard Worker  ret void
20*9880d681SAndroid Build Coastguard Worker}
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker; CHECK: bar
23*9880d681SAndroid Build Coastguard Worker; CHECK: crc32b
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Workerattributes #0 = { "target-cpu"="x86-64" "target-features"="+avx2" }
26*9880d681SAndroid Build Coastguard Workerattributes #2 = { "target-cpu"="corei7" "target-features"="+sse4.2" }
27