[PATCH] D151122: [GlobalISel] Check if ShiftAmt is greater then size of operand

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 6 13:58:45 PDT 2023


arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/sext_inreg.ll:968-971
+; GFX8-NEXT:    v_mov_b32_e32 v0, 0
+; GFX8-NEXT:    v_mov_b32_e32 v1, 0
+; GFX8-NEXT:    v_mov_b32_e32 v2, 0
+; GFX8-NEXT:    v_mov_b32_e32 v3, 0
----------------
This looks like it was broken before but is differently broken now


================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/sext_inreg.ll:1001
   %shl = shl <8 x i16> %value, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
   %ashr = shl <8 x i16> %shl, <i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11, i16 11>
   %cast = bitcast <8 x i16> %ashr to <4 x float>
----------------
Ah, this test should be using ashr not shl


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

https://reviews.llvm.org/D151122



More information about the llvm-commits mailing list