[PATCH] D90231: [GVN] Don't replace argument to @llvm.is.constant.*()

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 02:11:56 PDT 2020


uweigand added a comment.

In D90231#2358421 <https://reviews.llvm.org/D90231#2358421>, @jonpa wrote:

> I think it makes general sense to not optimize the argument to @llvm.is.constant.

Sometimes, it may be necessary to optimize the argument to @llvm.is.constant so that you even recognize it is in fact constant.  An example might be a constant argument propagated into an inlined function which uses @llvm.is.constant on the argument variable.  (This seems to be a quite typical use of the predicate e.g. in kernel sources.)

Not sure if this would be affected by your proposed patch, but it's something to keep in mind.


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

https://reviews.llvm.org/D90231



More information about the llvm-commits mailing list