blob: 2e7a64d84000de1a6e9c9a20a87f9276eaaab669 [file] [log] [blame]
Clement Courbet203fc172017-04-21 09:20:50 +00001; RUN: llc -mtriple=x86_64-linux-gnu -mattr=-ermsb < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST
2; RUN: llc -mtriple=x86_64-linux-gnu -mattr=+ermsb < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=FAST
Clement Courbet2430e252017-04-21 09:20:58 +00003; RUN: llc -mtriple=i686-linux-gnu -mattr=-ermsb < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST32
4; RUN: llc -mtriple=i686-linux-gnu -mattr=+ermsb < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=FAST
5; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=generic < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST
6; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=haswell < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=FAST
Clement Courbet00b51bf2017-04-21 09:21:01 +00007; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=skylake < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=FAST
8; FIXME: The documentation states that ivybridge has ermsb, but this is not
9; enabled right now since I could not confirm by testing.
Clement Courbet2430e252017-04-21 09:20:58 +000010; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=ivybridge < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST
Clement Courbet1ce3b822017-04-21 09:20:39 +000011
12%struct.large = type { [4096 x i8] }
13
14declare void @foo(%struct.large* align 8 byval) nounwind
15
16define void @test1(%struct.large* nocapture %x) nounwind {
17 call void @foo(%struct.large* align 8 byval %x)
18 ret void
19
20; ALL-LABEL: test1:
21; NOFAST: rep;movsq
Clement Courbet2430e252017-04-21 09:20:58 +000022; NOFAST32: rep;movsl
Clement Courbet1ce3b822017-04-21 09:20:39 +000023; FAST: rep;movsb
Clement Courbet1ce3b822017-04-21 09:20:39 +000024}
Clement Courbetd5f61822017-04-21 09:20:55 +000025
26define void @test2(%struct.large* nocapture %x) nounwind minsize {
27 call void @foo(%struct.large* align 8 byval %x)
28 ret void
29
30; ALL-LABEL: test2:
31; NOFAST: rep;movsq
Clement Courbet2430e252017-04-21 09:20:58 +000032; NOFAST32: rep;movsl
Clement Courbetd5f61822017-04-21 09:20:55 +000033; FAST: rep;movsb
Clement Courbetd5f61822017-04-21 09:20:55 +000034}
35
36%struct.large_oddsize = type { [4095 x i8] }
37
38declare void @foo_oddsize(%struct.large_oddsize* align 8 byval) nounwind
39
40define void @test3(%struct.large_oddsize* nocapture %x) nounwind minsize {
41 call void @foo_oddsize(%struct.large_oddsize* align 8 byval %x)
42 ret void
43
44; ALL-LABEL: test3:
45; NOFAST: rep;movsb
Clement Courbet2430e252017-04-21 09:20:58 +000046; NOFAST32: rep;movsb
Clement Courbetd5f61822017-04-21 09:20:55 +000047; FAST: rep;movsb
Clement Courbetd5f61822017-04-21 09:20:55 +000048}