[all-commits] [llvm/llvm-project] 7e3ef7: [AMDGPU] lowerEXTRACT_VECTOR_ELT - fold from a SCA...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Sat May 7 12:24:21 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7e3ef7dcd2b8201dce671237857f04a1d527d580
https://github.com/llvm/llvm-project/commit/7e3ef7dcd2b8201dce671237857f04a1d527d580
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2022-05-07 (Sat, 07 May 2022)
Changed paths:
M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
M llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll
M llvm/test/CodeGen/AMDGPU/load-lo16.ll
Log Message:
-----------
[AMDGPU] lowerEXTRACT_VECTOR_ELT - fold from a SCALAR_TO_VECTOR source
As suggested by @foad on D124839
If we're extracting a vector element that originally came from a scalar_to_vector, then avoid the bitcasting of a vector type and perform the shift masking on the (any-extended) scalar source directly, making use of the fact that the upper elements of a scalar_to_vector are all undef.
Differential Revision: https://reviews.llvm.org/D125173
More information about the All-commits
mailing list