[PATCH] D52171: [X86][SSE] Use ISD::MULHS for constant vXi16 ISD::SRA lowering (PR38151)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 17 07:11:30 PDT 2018
RKSimon created this revision.
RKSimon added reviewers: craig.topper, spatel, lebedev.ri, andreadb.
Similar to the existing ISD::SRL constant vector shifts from https://reviews.llvm.org/D49562, this patch adds ISD::SRA support with ISD::MULHS.
As we're dealing with signed values, we have to handle shift by zero and shift by one special cases, so XOP+AVX2/AVX512 splitting/extension is still a better solution - really we should still use ISD::MULHS if one of the special cases are used but for now I've just left a TODO and filtered by isKnownNeverZero.
Repository:
rL LLVM
https://reviews.llvm.org/D52171
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/combine-sdiv.ll
test/CodeGen/X86/vector-shift-ashr-128.ll
test/CodeGen/X86/vector-shift-ashr-256.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52171.165762.patch
Type: text/x-patch
Size: 39744 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180917/e3e8c2f3/attachment.bin>
More information about the llvm-commits
mailing list