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 | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame^] | 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 | ; FIXME: The documentation stes that ivybridge has ermsb, but this is not |
| 8 | ; enabled right now since I coud not confirm by testing. |
| 9 | ; RUN: llc -mtriple=x86_64-linux-gnu -mcpu=ivybridge < %s -o - | FileCheck %s --check-prefix=ALL --check-prefix=NOFAST |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 10 | |
| 11 | %struct.large = type { [4096 x i8] } |
| 12 | |
| 13 | declare void @foo(%struct.large* align 8 byval) nounwind |
| 14 | |
| 15 | define void @test1(%struct.large* nocapture %x) nounwind { |
| 16 | call void @foo(%struct.large* align 8 byval %x) |
| 17 | ret void |
| 18 | |
| 19 | ; ALL-LABEL: test1: |
| 20 | ; NOFAST: rep;movsq |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame^] | 21 | ; NOFAST32: rep;movsl |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 22 | ; FAST: rep;movsb |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 23 | } |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 24 | |
| 25 | define void @test2(%struct.large* nocapture %x) nounwind minsize { |
| 26 | call void @foo(%struct.large* align 8 byval %x) |
| 27 | ret void |
| 28 | |
| 29 | ; ALL-LABEL: test2: |
| 30 | ; NOFAST: rep;movsq |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame^] | 31 | ; NOFAST32: rep;movsl |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 32 | ; FAST: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 33 | } |
| 34 | |
| 35 | %struct.large_oddsize = type { [4095 x i8] } |
| 36 | |
| 37 | declare void @foo_oddsize(%struct.large_oddsize* align 8 byval) nounwind |
| 38 | |
| 39 | define void @test3(%struct.large_oddsize* nocapture %x) nounwind minsize { |
| 40 | call void @foo_oddsize(%struct.large_oddsize* align 8 byval %x) |
| 41 | ret void |
| 42 | |
| 43 | ; ALL-LABEL: test3: |
| 44 | ; NOFAST: rep;movsb |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame^] | 45 | ; NOFAST32: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 46 | ; FAST: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 47 | } |