[PATCH] D106776: [GlobalISel] Add a constant folding combine.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 25 15:10:35 PDT 2021


aemerson created this revision.
aemerson added reviewers: arsenm, paquette, jroelofs, foad.
aemerson added a project: LLVM.
Herald added subscribers: kerbowa, hiraditya, kristof.beyls, rovka, nhaehnle, jvesely.
aemerson requested review of this revision.
Herald added a subscriber: wdng.

These don't always get folded because when the instructions are created the constants are obscured by artifacts, or other reasons.

Use it AArch64 post-legal combiner too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106776

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/lib/Target/AArch64/AArch64Combine.td
  llvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-constant-fold.mir
  llvm/test/CodeGen/AArch64/fold-global-offsets.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i32.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106776.361546.patch
Type: text/x-patch
Size: 409118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210725/1a6537bd/attachment-0001.bin>


More information about the llvm-commits mailing list