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

Acim Maravic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 22 10:09:07 PDT 2023


Acim-Maravic created this revision.
Acim-Maravic added reviewers: Petar.Avramovic, matejam, mbrkusanin, foad, arsenm.
Acim-Maravic added a project: LLVM.
Herald added subscribers: StephenFan, kerbowa, hiraditya, jvesely.
Herald added a project: All.
Acim-Maravic requested review of this revision.
Herald added a subscriber: wdng.

matchCombineShlOfExtend did not check if the size of new shift would be
wider then a size of operand. Current condition did not work if the value
being shifted was zero.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151122

Files:
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/prelegalizer-combiner-divrem-insertpt-crash.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shl-from-extend-narrow.postlegal.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/combine-shl-from-extend-narrow.prelegal.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/sext_inreg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151122.524373.patch
Type: text/x-patch
Size: 6411 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230522/45e1bf29/attachment.bin>


More information about the llvm-commits mailing list