1 ; 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 3 ; 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 7 ; 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. 10 ; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=ivybridge < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST 11 12 %struct.large = type { [4096 x i8] } 13 14 declare void @foo(%struct.large* align 8 byval) nounwind 15 16 define 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 22 ; NOFAST32: rep;movsl 23 ; FAST: rep;movsb 24 } 25 26 define 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 32 ; NOFAST32: rep;movsl 33 ; FAST: rep;movsb 34 } 35 36 %struct.large_oddsize = type { [4095 x i8] } 37 38 declare void @foo_oddsize(%struct.large_oddsize* align 8 byval) nounwind 39 40 define 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 46 ; NOFAST32: rep;movsb 47 ; FAST: rep;movsb 48 } 49