[PATCH] D115737: [IPSCCP] Partial support for constrained intrinsics

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 11:58:46 PDT 2022


nikic added a comment.

In D115737#3831400 <https://reviews.llvm.org/D115737#3831400>, @kpn wrote:

> In D115737#3615950 <https://reviews.llvm.org/D115737#3615950>, @nikic wrote:
>
>> Why isn't this already handled by ConstantFoldCall?
>
> Because ConstantFoldCall() is called from handleCallResult(), and we're skipping that part of handleCallBase() due to having constrained fcmp/fcmps behave just like the non-constrained. Instead we're constant folding in visitCmpInst().

Sorry, what I meant is: Why is this not handled by ConstantFoldCall() //prior// to your changes? There should be no need for special handling of these intrinsics here.

>From a cursory look, I think the problem is that handleCallOverdefined() doesn't deal with metadata operands. I expect that if you fix this, then constrained intrinsics will "just work".


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

https://reviews.llvm.org/D115737



More information about the llvm-commits mailing list