[PATCH] D156534: GlobalISel: Add shifts to constant_fold combine

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 06:36:39 PDT 2023


arsenm created this revision.
arsenm added reviewers: aemerson, Pierre-vh, mbrkusanin, Petar.Avramovic, paquette.
Herald added subscribers: kerbowa, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Currently we're getting away with post-selection constant folding on
these (a hack which exists for the DAG).


https://reviews.llvm.org/D156534

Files:
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-ashr.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-lshr.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/postlegalizercombiner-shl.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i32.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i32.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156534.545132.patch
Type: text/x-patch
Size: 112476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230728/0a684987/attachment-0001.bin>


More information about the llvm-commits mailing list