[PATCH] D157133: [AMDGPU] Extend CalculateByteProvider to capture vectors and signed

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 7 14:21:46 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:10660
+  case ISD::EXTRACT_VECTOR_ELT: {
+    auto VecIdx = dyn_cast<ConstantSDNode>(Op->getOperand(1))->getZExtValue();
+    auto ScalarSize = Op.getScalarValueSizeInBits();
----------------
Unchecked dyn_cast, this will break on variable indexes


================
Comment at: llvm/test/CodeGen/AMDGPU/permute_i8.ll:2786
+  %byte2 = shl i32 %zv1e3, 16
+  %v2e3 = extractelement <4 x i8> %vec2, i64 3
+  %zv2e3 = zext i8 %v2e3 to i32
----------------
Need test with a variable index


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157133/new/

https://reviews.llvm.org/D157133



More information about the llvm-commits mailing list