[llvm-bugs] [Bug 41020] New: isBitwiseNot / isConstOrConstSplat etc don't support build vector truncation
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 10 03:07:55 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41020
Bug ID: 41020
Summary: isBitwiseNot / isConstOrConstSplat etc don't support
build vector truncation
Product: libraries
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: nikita.ppv at gmail.com
CC: llvm-bugs at lists.llvm.org
The isBitwiseNot() helper currently misses cases where a build_vector of
implicitly truncated constants is used. E.g. an all-ones vNi16 build vector on
AArch64 will use i32 elements of value 65535.
isBitwiseNot() is based on isConstOrConstSplat(), which is where this
limitation ultimately comes from.
It would be possible to easily fix isBitwiseNot() specifically by using the
ISD::isBuildVectorAllOnes() helper (which does handle truncation correctly),
but it would be nice to support this for the whole isConstOrConstSplat()
machinery.
See https://reviews.llvm.org/D59174 for a case where we run into this issue.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190310/f1b58c23/attachment-0001.html>
More information about the llvm-bugs
mailing list