Clement Courbet | 203fc17 | 2017-04-21 09:20:50 +0000 | [diff] [blame] | 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 |
Clement Courbet | a7c233f | 2017-04-21 09:20:44 +0000 | [diff] [blame] | 3 | ; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=haswell < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=HASWELL |
| 4 | ; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=generic < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=GENERIC |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 5 | |
| 6 | %struct.large = type { [4096 x i8] } |
| 7 | |
| 8 | declare void @foo(%struct.large* align 8 byval) nounwind |
| 9 | |
| 10 | define void @test1(%struct.large* nocapture %x) nounwind { |
| 11 | call void @foo(%struct.large* align 8 byval %x) |
| 12 | ret void |
| 13 | |
| 14 | ; ALL-LABEL: test1: |
| 15 | ; NOFAST: rep;movsq |
Clement Courbet | a7c233f | 2017-04-21 09:20:44 +0000 | [diff] [blame] | 16 | ; GENERIC: rep;movsq |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 17 | ; FAST: rep;movsb |
Clement Courbet | a7c233f | 2017-04-21 09:20:44 +0000 | [diff] [blame] | 18 | ; HASWELL: rep;movsb |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 19 | } |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame^] | 20 | |
| 21 | define void @test2(%struct.large* nocapture %x) nounwind minsize { |
| 22 | call void @foo(%struct.large* align 8 byval %x) |
| 23 | ret void |
| 24 | |
| 25 | ; ALL-LABEL: test2: |
| 26 | ; NOFAST: rep;movsq |
| 27 | ; GENERIC: rep;movsq |
| 28 | ; FAST: rep;movsb |
| 29 | ; HASWELL: rep;movsb |
| 30 | } |
| 31 | |
| 32 | %struct.large_oddsize = type { [4095 x i8] } |
| 33 | |
| 34 | declare void @foo_oddsize(%struct.large_oddsize* align 8 byval) nounwind |
| 35 | |
| 36 | define void @test3(%struct.large_oddsize* nocapture %x) nounwind minsize { |
| 37 | call void @foo_oddsize(%struct.large_oddsize* align 8 byval %x) |
| 38 | ret void |
| 39 | |
| 40 | ; ALL-LABEL: test3: |
| 41 | ; NOFAST: rep;movsb |
| 42 | ; GENERIC: rep;movsb |
| 43 | ; FAST: rep;movsb |
| 44 | ; HASWELL: rep;movsb |
| 45 | } |