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 |
Clement Courbet | 00b51bf | 2017-04-21 09:21:01 +0000 | [diff] [blame] | 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. |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame] | 10 | ; 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] | 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 |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame] | 22 | ; NOFAST32: rep;movsl |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 23 | ; FAST: rep;movsb |
Clement Courbet | 1ce3b82 | 2017-04-21 09:20:39 +0000 | [diff] [blame] | 24 | } |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 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 |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame] | 32 | ; NOFAST32: rep;movsl |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 33 | ; FAST: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 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 |
Clement Courbet | 2430e25 | 2017-04-21 09:20:58 +0000 | [diff] [blame] | 46 | ; NOFAST32: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 47 | ; FAST: rep;movsb |
Clement Courbet | d5f6182 | 2017-04-21 09:20:55 +0000 | [diff] [blame] | 48 | } |