1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test/CodeGen/X86/pr40994.ll
Craig Topper 0663a19f9d Recommit r367901 "[X86] Enable -x86-experimental-vector-widening-legalization by default."
The assert that caused this to be reverted should be fixed now.

Original commit message:

This patch changes our defualt legalization behavior for 16, 32, and
64 bit vectors with i8/i16/i32/i64 scalar types from promotion to
widening. For example, v8i8 will now be widened to v16i8 instead of
promoted to v8i16. This keeps the elements widths the same and pads
with undef elements. We believe this is a better legalization strategy.
But it carries some issues due to the fragmented vector ISA. For
example, i8 shifts and multiplies get widened and then later have
to be promoted/split into vXi16 vectors.

This has the potential to cause regressions so we wanted to get
it in early in the 10.0 cycle so we have plenty of time to
address them.

Next steps will be to merge tests that explicitly test the command
line option. And then we can remove the option and its associated
code.

llvm-svn: 368183
2019-08-07 16:24:26 +00:00

24 lines
1.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=sse4.2 | FileCheck %s
define <8 x i8> @foo(<16 x i8> %a) {
; CHECK-LABEL: foo:
; CHECK: # %bb.0:
; CHECK-NEXT: pextrb $0, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $2, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $4, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $6, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $8, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $10, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $12, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: pextrb $14, %xmm0, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
; CHECK-NEXT: retq
%v = alloca i8, i32 8, align 16
call void @llvm.masked.compressstore.v16i8(<16 x i8> %a, i8* %v, <16 x i1> <i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false>)
%ptr = bitcast i8* %v to <8 x i8>*
%out = load <8 x i8>, <8 x i8>* %ptr
ret <8 x i8> %out
}
declare void @llvm.masked.compressstore.v16i8(<16 x i8>, i8*, <16 x i1>) #0