[PATCH] D28455: [X86] Fix PR30926 - Add patterns for optimizing cvtsi2ss, cvtsi2sd, cvtsd2ss and cvtss2sd clang intrinsic sequences

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 06:03:49 PST 2017


RKSimon added inline comments.


================
Comment at: lib/Target/X86/X86InstrSSE.td:1962
+}
+let Predicates = [HasAVX] in {
+def : Pat<(v4f32 (X86Movss
----------------
eladcohen wrote:
> RKSimon wrote:
> > Should this be [UseAVX] and then add AVX512 patterns in X86InstrAVX512.td ?
> For AVX512 I see two types of intrinsics that correspond to these instructions:
> 1) With Rounding mode or masks (e.g. _mm_cvt_roundi64_sd) - These will generate a builtin and not generic IR, so they don't require any new patterns.
> 2) Without rounding mode and masks (e.g. _mm_cvti32_sd) - These are mapped by macros to their matching AVX instruction which are handled in the above patterns - And that's why I want [HasAVX] to catch them.
@craig.topper @igorb Is using the AVX path for AVX512 alright with you guys?


https://reviews.llvm.org/D28455





More information about the llvm-commits mailing list