[PATCH] D156401: [PatternMatch] Do not match constant expressions for binops

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 11:40:40 PDT 2023


nikic added a comment.

In D156401#4539763 <https://reviews.llvm.org/D156401#4539763>, @goldstein.w.n wrote:

> Is there a way to check/get a ConstantExpr as a ImmConstant? If so maybe this should come with an update to `m_ImmConstant` to also try to extract from a ConstantExpr match.

I don't really get what you mean here. Isn't m_ImmConstant specifically about //not// matching constant expressions? m_Constant() is the way to match arbitrary constants (including ConstantExpr).


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

https://reviews.llvm.org/D156401



More information about the llvm-commits mailing list