1 ; Three variants of "MSVC" environments.
2 ; RUN: llc < %s -mattr=sse2 -mattr=avx | FileCheck %s
3 ; RUN: llc < %s -mtriple=x86_64-win32 -mattr=sse2 -mattr=avx | FileCheck %s
4 ; RUN: llc < %s -mtriple=x86_64-windows-msvc -mattr=sse2 -mattr=avx | FileCheck %s
6 ; RUN: llc < %s -mtriple=x86_64-win32-gnu -mattr=sse2 -mattr=avx | FileCheck -check-prefix=MINGW %s
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target triple = "x86_64-pc-win32"
10 define double @double() {
11 ret double 0x0000000000800000
13 ; CHECK: .globl __real@0000000000800000
14 ; CHECK-NEXT: .section .rdata,"dr",discard,__real@0000000000800000
15 ; CHECK-NEXT: .p2align 3
16 ; CHECK-NEXT: __real@0000000000800000:
17 ; CHECK-NEXT: .quad 8388608
19 ; CHECK: movsd __real@0000000000800000(%rip), %xmm0
22 ; MINGW: .section .rdata,"dr"
23 ; MINGW-NEXT: .p2align 3
24 ; MINGW-NEXT: [[LABEL:\.LC.*]]:
25 ; MINGW-NEXT: .quad 8388608
27 ; MINGW: movsd [[LABEL]](%rip), %xmm0
30 define <4 x i32> @vec1() {
31 ret <4 x i32> <i32 3, i32 2, i32 1, i32 0>
33 ; CHECK: .globl __xmm@00000000000000010000000200000003
34 ; CHECK-NEXT: .section .rdata,"dr",discard,__xmm@00000000000000010000000200000003
35 ; CHECK-NEXT: .p2align 4
36 ; CHECK-NEXT: __xmm@00000000000000010000000200000003:
42 ; CHECK: movaps __xmm@00000000000000010000000200000003(%rip), %xmm0
45 define <8 x i16> @vec2() {
46 ret <8 x i16> <i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
48 ; CHECK: .globl __xmm@00000001000200030004000500060007
49 ; CHECK-NEXT: .section .rdata,"dr",discard,__xmm@00000001000200030004000500060007
50 ; CHECK-NEXT: .p2align 4
51 ; CHECK-NEXT: __xmm@00000001000200030004000500060007:
52 ; CHECK-NEXT: .short 7
53 ; CHECK-NEXT: .short 6
54 ; CHECK-NEXT: .short 5
55 ; CHECK-NEXT: .short 4
56 ; CHECK-NEXT: .short 3
57 ; CHECK-NEXT: .short 2
58 ; CHECK-NEXT: .short 1
59 ; CHECK-NEXT: .short 0
61 ; CHECK: movaps __xmm@00000001000200030004000500060007(%rip), %xmm0
65 define <4 x float> @undef1() {
66 ret <4 x float> <float 1.0, float 1.0, float undef, float undef>
68 ; CHECK: .globl __xmm@00000000000000003f8000003f800000
69 ; CHECK-NEXT: .section .rdata,"dr",discard,__xmm@00000000000000003f8000003f800000
70 ; CHECK-NEXT: .p2align 4
71 ; CHECK-NEXT: __xmm@00000000000000003f8000003f800000:
72 ; CHECK-NEXT: .long 1065353216 # float 1
73 ; CHECK-NEXT: .long 1065353216 # float 1
77 ; CHECK: movaps __xmm@00000000000000003f8000003f800000(%rip), %xmm0
81 define float @pr23966(i32 %a) {
82 %tobool = icmp ne i32 %a, 0
83 %sel = select i1 %tobool, float -1.000000e+00, float 1.000000e+00
87 ; CHECK: .globl __real@bf8000003f800000
88 ; CHECK-NEXT: .section .rdata,"dr",discard,__real@bf8000003f800000
89 ; CHECK-NEXT: .p2align 3
90 ; CHECK-NEXT: __real@bf8000003f800000:
91 ; CHECK-NEXT: .long 1065353216
92 ; CHECK-NEXT: .long 3212836864
94 define <4 x i64> @ymm() {
96 ret <4 x i64> <i64 8589934593, i64 17179869187, i64 8589934593, i64 17179869187>
99 ; CHECK: .globl __ymm@0000000400000003000000020000000100000004000000030000000200000001
100 ; CHECK: .section .rdata,"dr",discard,__ymm@0000000400000003000000020000000100000004000000030000000200000001
102 ; CHECK: __ymm@0000000400000003000000020000000100000004000000030000000200000001:
103 ; CHECK: .quad 8589934593 # 0x200000001
104 ; CHECK: .quad 17179869187 # 0x400000003
105 ; CHECK: .quad 8589934593 # 0x200000001
106 ; CHECK: .quad 17179869187