mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 16:31:16 +00:00
378f3188a0
For targeting pecoff, ".def foo" appears before ".short 32". .def foo; ... .LCPI0_0: .short 32 foo: CHECK-LABEL seeks not from ".short 32" but from the top of the input. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201931 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
1.0 KiB
LLVM
31 lines
1.0 KiB
LLVM
; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+sse2 | FileCheck %s
|
|
; RUN: llc < %s -o - -mcpu=generic -march=x86-64 -mattr=+avx | FileCheck %s
|
|
|
|
define <8 x i16> @foo(<8 x i16> %a, <8 x i16> %b) {
|
|
; CHECK: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-NEXT: .short 32
|
|
; CHECK-LABEL: {{^_?foo:}}
|
|
; CHECK-NOT: psll
|
|
entry:
|
|
%icmp = icmp eq <8 x i16> %a, %b
|
|
%zext = zext <8 x i1> %icmp to <8 x i16>
|
|
%shl = shl nuw nsw <8 x i16> %zext, <i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
|
|
ret <8 x i16> %shl
|
|
}
|
|
|
|
; Don't fail with an assert due to an undef in the buildvector
|
|
define <8 x i16> @bar(<8 x i16> %a, <8 x i16> %b) {
|
|
; CHECK-LABEL: bar
|
|
entry:
|
|
%icmp = icmp eq <8 x i16> %a, %b
|
|
%zext = zext <8 x i1> %icmp to <8 x i16>
|
|
%shl = shl nuw nsw <8 x i16> %zext, <i16 5, i16 undef, i16 5, i16 5, i16 5, i16 5, i16 5, i16 5>
|
|
ret <8 x i16> %shl
|
|
}
|