aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
diff options
context:
space:
mode:
authorJoe Ellis <joe.ellis@arm.com>2021-06-18 14:53:53 +0000
committerJoe Ellis <joe.ellis@arm.com>2021-06-23 10:33:22 +0000
commit3c4dbf6ea9a06d0e5b460895bc5677ca7e382b4e (patch)
treef0716d8fc242f384132ccb75fd420495fc3a0f00 /lldb/source/Commands/CommandObjectMultiword.cpp
parentcfb1cb4491d7aac218d9fd903a69b46bbc21118b (diff)
downloadllvm-3c4dbf6ea9a06d0e5b460895bc5677ca7e382b4e.zip
llvm-3c4dbf6ea9a06d0e5b460895bc5677ca7e382b4e.tar.gz
llvm-3c4dbf6ea9a06d0e5b460895bc5677ca7e382b4e.tar.bz2
[Verifier] Fail on overrunning and invalid indices for {insert,extract} vector intrinsics
With regards to overrunning, the langref (llvm/docs/LangRef.rst) specifies: (llvm.experimental.vector.insert) Elements ``idx`` through (``idx`` + num_elements(``subvec``) - 1) must be valid ``vec`` indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined. (llvm.experimental.vector.extract) Elements ``idx`` through (``idx`` + num_elements(result_type) - 1) must be valid vector indices. If this condition cannot be determined statically but is false at runtime, then the result vector is undefined. For the non-mixed cases (e.g. inserting/extracting a scalable into/from another scalable, or inserting/extracting a fixed into/from another fixed), it is possible to statically check whether or not the above conditions are met. This was previously missing from the verifier, and if the conditions were found to be false, the result of the insertion/extraction would be replaced with an undef. With regards to invalid indices, the langref (llvm/docs/LangRef.rst) specifies: (llvm.experimental.vector.insert) ``idx`` represents the starting element number at which ``subvec`` will be inserted. ``idx`` must be a constant multiple of ``subvec``'s known minimum vector length. (llvm.experimental.vector.extract) The ``idx`` specifies the starting element number within ``vec`` from which a subvector is extracted. ``idx`` must be a constant multiple of the known-minimum vector length of the result type. Similarly, these conditions were not previously enforced in the verifier. In some circumstances, invalid indices were permitted silently, and in other circumstances, an undef was spawned where a verifier error would have been preferred. This commit adds verifier checks to enforce the constraints above. Differential Revision: https://reviews.llvm.org/D104468
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
0 files changed, 0 insertions, 0 deletions