1 ; RUN: llc -mtriple=x86_64-linux -mcpu=atom < %s | FileCheck %s
2 ; RUN: llc -mtriple=x86_64-linux -mcpu=slm < %s | FileCheck %s -check-prefix=SLM
4 declare i32 @llvm.bswap.i32(i32) nounwind readnone
5 declare i64 @llvm.bswap.i64(i64) nounwind readnone
7 define void @test1(i32* nocapture %x, i32 %y) nounwind {
8 %bswap = call i32 @llvm.bswap.i32(i32 %y)
9 store i32 %bswap, i32* %x, align 4
12 ; CHECK: movbel %esi, (%rdi)
14 ; SLM: movbel %esi, (%rdi)
17 define i32 @test2(i32* %x) nounwind {
18 %load = load i32* %x, align 4
19 %bswap = call i32 @llvm.bswap.i32(i32 %load)
22 ; CHECK: movbel (%rdi), %eax
24 ; SLM: movbel (%rdi), %eax
27 define void @test3(i64* %x, i64 %y) nounwind {
28 %bswap = call i64 @llvm.bswap.i64(i64 %y)
29 store i64 %bswap, i64* %x, align 8
32 ; CHECK: movbeq %rsi, (%rdi)
34 ; SLM: movbeq %rsi, (%rdi)
37 define i64 @test4(i64* %x) nounwind {
38 %load = load i64* %x, align 8
39 %bswap = call i64 @llvm.bswap.i64(i64 %load)
42 ; CHECK: movbeq (%rdi), %rax
44 ; SLM: movbeq (%rdi), %rax