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 5; GNU environment. 6; RUN: llc < %s -mtriple=x86_64-win32-gnu -mattr=sse2 -mattr=avx | FileCheck -check-prefix=MINGW %s 7target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 8target triple = "x86_64-pc-win32" 9 10define double @double() { 11 ret double 0x0000000000800000 12} 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 0x0000000000800000 18; CHECK: double: 19; CHECK: movsd __real@0000000000800000(%rip), %xmm0 20; CHECK-NEXT: ret 21 22; MINGW: .section .rdata,"dr" 23; MINGW-NEXT: .p2align 3 24; MINGW-NEXT: [[LABEL:\.LC.*]]: 25; MINGW-NEXT: .quad 0x0000000000800000 26; MINGW: double: 27; MINGW: movsd [[LABEL]](%rip), %xmm0 28; MINGW-NEXT: ret 29 30define <4 x i32> @vec1() { 31 ret <4 x i32> <i32 3, i32 2, i32 1, i32 0> 32} 33; CHECK: .globl __xmm@00000000000000010000000200000003 34; CHECK-NEXT: .section .rdata,"dr",discard,__xmm@00000000000000010000000200000003 35; CHECK-NEXT: .p2align 4 36; CHECK-NEXT: __xmm@00000000000000010000000200000003: 37; CHECK-NEXT: .long 3 38; CHECK-NEXT: .long 2 39; CHECK-NEXT: .long 1 40; CHECK-NEXT: .long 0 41; CHECK: vec1: 42; CHECK: movaps __xmm@00000000000000010000000200000003(%rip), %xmm0 43; CHECK-NEXT: ret 44 45define <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> 47} 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 60; CHECK: vec2: 61; CHECK: movaps __xmm@00000001000200030004000500060007(%rip), %xmm0 62; CHECK-NEXT: ret 63 64 65define <4 x float> @undef1() { 66 ret <4 x float> <float 1.0, float 1.0, float undef, float undef> 67 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 0x3f800000 # float 1 73; CHECK-NEXT: .long 0x3f800000 # float 1 74; CHECK-NEXT: .zero 4 75; CHECK-NEXT: .zero 4 76; CHECK: undef1: 77; CHECK: movaps __xmm@00000000000000003f8000003f800000(%rip), %xmm0 78; CHECK-NEXT: ret 79} 80 81define float @pr23966(i32 %a) { 82 %tobool = icmp ne i32 %a, 0 83 %sel = select i1 %tobool, float -1.000000e+00, float 1.000000e+00 84 ret float %sel 85} 86 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 0x3f800000 92; CHECK-NEXT: .long 0xbf800000 93 94define <4 x i64> @ymm() { 95entry: 96 ret <4 x i64> <i64 8589934593, i64 17179869187, i64 8589934593, i64 17179869187> 97} 98 99; CHECK: .globl __ymm@0000000400000003000000020000000100000004000000030000000200000001 100; CHECK: .section .rdata,"dr",discard,__ymm@0000000400000003000000020000000100000004000000030000000200000001 101; CHECK: .p2align 5 102; CHECK: __ymm@0000000400000003000000020000000100000004000000030000000200000001: 103; CHECK: .quad 8589934593 # 0x200000001 104; CHECK: .quad 17179869187 # 0x400000003 105; CHECK: .quad 8589934593 # 0x200000001 106; CHECK: .quad 17179869187 107