[PATCH] D143542: [SeparateConstOffsetFromGEP] Fix: `b - a` matched `a - b` during reuniteExts

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 13 23:48:38 PST 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM. Using SCEV expressions as a deduplication key seems kind of odd in the first place, but I guess for adds it does provide some value, because you get complexity canonicalization for free. Of course, for subs we don't want that, and this effectively prevents it.



================
Comment at: llvm/test/Transforms/SeparateConstOffsetFromGEP/split-gep-sub.ll:4
 
 define void @test(ptr %p) {
 ; CHECK-LABEL: @test(
----------------
Please include a comment on what this is testing, it's not particularly obvious. 


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

https://reviews.llvm.org/D143542



More information about the llvm-commits mailing list