mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
34288d885e
Now that we can fully specify extload legality, we can declare them legal for the PMOVSX/PMOVZX instructions. This for instance enables a DAGCombine to fire on code such as (and (<zextload-equivalent> ...), <redundant mask>) to turn it into: (zextload ...) as seen in the testcase changes. There is one regression, in widen_load-2.ll: we're no longer able to do store-to-load forwarding with illegal extload memory types. This will be addressed separately. Differential Revision: http://reviews.llvm.org/D6533 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226676 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
1.0 KiB
LLVM
28 lines
1.0 KiB
LLVM
; RUN: llc < %s -x86-experimental-vector-shuffle-lowering=false -mattr=+avx2 | FileCheck %s
|
|
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-apple-darwin"
|
|
|
|
; PR21876
|
|
; The old shuffle lowering sometimes generates VZEXT nodes with both input
|
|
; and output same-sized types, here 256-bits. For instance, a v8i8 to v8i32
|
|
; zero-extend would become a (v8i32 (VZEXT v32i8)) node, which can't happen
|
|
; otherwise. The companion commit r223996 added those patterns temporarily.
|
|
; This test, along with the VR256 for AVX2 PMOVXrr instructions, should be
|
|
; removed once the old vector shuffle lowering goes away.
|
|
|
|
define void @test_avx2_pmovx_256(<8 x i8>* %tmp64, <8 x float>* %tmp75) {
|
|
; CHECK-LABEL: test_avx2_pmovx_256
|
|
; We really don't care about the generated code.
|
|
; CHECK: vpmovzxbd
|
|
; CHECK: vcvtdq2ps
|
|
; CHECK: vmovups
|
|
; CHECK: vzeroupper
|
|
; CHECK: retq
|
|
|
|
%wide.load458 = load <8 x i8>* %tmp64, align 1
|
|
%tmp68 = uitofp <8 x i8> %wide.load458 to <8 x float>
|
|
store <8 x float> %tmp68, <8 x float>* %tmp75, align 4
|
|
ret void
|
|
}
|