[llvm] r336625 - [X86] Add test cases that show failure to fold load into vfixupimm instructions due to bad isel pattern.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 9 17:49:47 PDT 2018
Author: ctopper
Date: Mon Jul 9 17:49:47 2018
New Revision: 336625
URL: http://llvm.org/viewvc/llvm-project?rev=336625&view=rev
Log:
[X86] Add test cases that show failure to fold load into vfixupimm instructions due to bad isel pattern.
Modified:
llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
Modified: llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll?rev=336625&r1=336624&r2=336625&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/X86/avx512-intrinsics.ll Mon Jul 9 17:49:47 2018
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f | FileCheck %s
+; RUN: llc < %s -disable-peephole -mtriple=x86_64-apple-darwin -mattr=+avx512f | FileCheck %s
define <8 x double> @test_mask_compress_pd_512(<8 x double> %data, <8 x double> %passthru, i8 %mask) {
@@ -4159,6 +4159,17 @@ define <8 x double>@test_int_x86_avx512_
ret <8 x double> %res4
}
+define <8 x double>@test_int_x86_avx512_mask_fixupimm_pd_512_load(<8 x double> %x0, <8 x double> %x1, <8 x i64>* %x2ptr) {
+; CHECK-LABEL: test_int_x86_avx512_mask_fixupimm_pd_512_load:
+; CHECK: ## %bb.0:
+; CHECK-NEXT: vmovapd (%rdi), %zmm2
+; CHECK-NEXT: vfixupimmpd $3, %zmm2, %zmm1, %zmm0
+; CHECK-NEXT: retq
+ %x2 = load <8 x i64>, <8 x i64>* %x2ptr
+ %res = call <8 x double> @llvm.x86.avx512.mask.fixupimm.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x i64> %x2, i32 3, i8 -1, i32 4)
+ ret <8 x double> %res
+}
+
declare <8 x double> @llvm.x86.avx512.maskz.fixupimm.pd.512(<8 x double>, <8 x double>, <8 x i64>, i32, i8, i32)
define <8 x double>@test_int_x86_avx512_maskz_fixupimm_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x i64> %x2, i8 %x4) {
@@ -4251,6 +4262,17 @@ define <16 x float>@test_int_x86_avx512_
ret <16 x float> %res4
}
+define <16 x float>@test_int_x86_avx512_mask_fixupimm_ps_512_load(<16 x float> %x0, <16 x float> %x1, <16 x i32>* %x2ptr) {
+; CHECK-LABEL: test_int_x86_avx512_mask_fixupimm_ps_512_load:
+; CHECK: ## %bb.0:
+; CHECK-NEXT: vmovaps (%rdi), %zmm2
+; CHECK-NEXT: vfixupimmps $5, %zmm2, %zmm1, %zmm0
+; CHECK-NEXT: retq
+ %x2 = load <16 x i32>, <16 x i32>* %x2ptr
+ %res = call <16 x float> @llvm.x86.avx512.mask.fixupimm.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x i32> %x2, i32 5, i16 -1, i32 4)
+ ret <16 x float> %res
+}
+
declare <16 x float> @llvm.x86.avx512.maskz.fixupimm.ps.512(<16 x float>, <16 x float>, <16 x i32>, i32, i16, i32)
define <16 x float>@test_int_x86_avx512_maskz_fixupimm_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x i32> %x2, i16 %x4) {
More information about the llvm-commits
mailing list