[PATCH] D51861: [LSR] Combine unfolded offset into invariant register

Gil Rapaport via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 10 08:57:03 PDT 2018


gilr created this revision.
gilr added reviewers: qcolombet, sanjoy, craig.topper, sunfish, sebpop, kparzysz, junbuml.
Herald added a reviewer: javed.absar.
Herald added a subscriber: llvm-commits.

LSR reassociates constants as unfolded offsets when the constants fit as immediate add operands, which currently prevents such constants from being combined later with loop invariant registers.

This patch modifies GenerateCombinations() to generate a second formula which includes the unfolded offset in the combined loop-invariant register.


Repository:
  rL LLVM

https://reviews.llvm.org/D51861

Files:
  lib/Transforms/Scalar/LoopStrengthReduce.cpp
  test/Transforms/LoopStrengthReduce/AArch64/small-constant.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51861.164679.patch
Type: text/x-patch
Size: 7802 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180910/67253a68/attachment.bin>


More information about the llvm-commits mailing list