[PATCH] D151796: [SCEV] Skip min/max expressions when normalizing/denormalizing SCEV expressions
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 31 06:30:43 PDT 2023
nikic added a comment.
First time I hear about SCEV normalization/denormalization. The entire approach looks highly dubious.
I'm concerned that this is not a complete fix and there are other cases where normalization/denormalization do not round-trip. What is the criterion that distinguishes min/max from other SCEV expressions? Could something similar affect udiv expressions for example?
I also noticed that there is a check in IVUsers for normalization/denormalization roundtrip at https://github.com/llvm/llvm-project/blob/0a3dc73e700b4a37bc435bf7c02213161b27f54a/llvm/lib/Analysis/IVUsers.cpp#L221-L231.
================
Comment at: llvm/lib/Analysis/ScalarEvolutionNormalization.cpp:91
+ return Expr;
+}
+
----------------
Presumably umin_seq also needs to be handled.
================
Comment at: llvm/test/Transforms/LoopStrengthReduce/pr62563.ll:6
-; XFAIL: *
-
----------------
Please precommit this change. This test should be showing a difference in generated IR.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151796/new/
https://reviews.llvm.org/D151796
More information about the llvm-commits
mailing list