[llvm] r374614 - [X86] Add test case showing missing opportunity to fold vmovsdb into a store after type legalization. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 17:00:59 PDT 2019
Author: ctopper
Date: Fri Oct 11 17:00:59 2019
New Revision: 374614
URL: http://llvm.org/viewvc/llvm-project?rev=374614&view=rev
Log:
[X86] Add test case showing missing opportunity to fold vmovsdb into a store after type legalization. NFC
Modified:
llvm/trunk/test/CodeGen/X86/avx512-trunc.ll
Modified: llvm/trunk/test/CodeGen/X86/avx512-trunc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-trunc.ll?rev=374614&r1=374613&r2=374614&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-trunc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-trunc.ll Fri Oct 11 17:00:59 2019
@@ -1044,3 +1044,23 @@ define void @negative_test2_smax_usat_tr
store <16 x i8> %x6, <16 x i8>* %res, align 1
ret void
}
+
+define void @ssat_trunc_db_1024_mem(<32 x i32> %i, <32 x i8>* %p) {
+; ALL-LABEL: ssat_trunc_db_1024_mem:
+; ALL: ## %bb.0:
+; ALL-NEXT: vpmovsdb %zmm0, %xmm0
+; ALL-NEXT: vpmovsdb %zmm1, %xmm1
+; ALL-NEXT: vmovdqu %xmm1, 16(%rdi)
+; ALL-NEXT: vmovdqu %xmm0, (%rdi)
+; ALL-NEXT: vzeroupper
+; ALL-NEXT: retq
+ %x1 = icmp sgt <32 x i32> %i, <i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32
+-128, i32 -128>
+ %x2 = select <32 x i1> %x1, <32 x i32> %i, <32 x i32> <i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128, i32 -128>
+ %x3 = icmp slt <32 x i32> %x2, <i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127>
+ %x5 = select <32 x i1> %x3, <32 x i32> %x2, <32 x i32> <i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127, i32 127>
+ %x6 = trunc <32 x i32> %x5 to <32 x i8>
+ store <32 x i8>%x6, <32 x i8>* %p, align 1
+ ret void
+}
+
More information about the llvm-commits
mailing list