[PATCH] D147558: [IR] Add a ConstantInt::getAllOnes wrapper around ConstantInt::get/getSigned.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 4 12:39:22 PDT 2023
craig.topper added a comment.
In D147558#4244139 <https://reviews.llvm.org/D147558#4244139>, @nikic wrote:
>> This patch adds ConstantInt::getAllOnes and replaces other calls to use it.
>
> Does it? I don't see any change to the Constant hierarchy.
>
> In any case, I don't get why we need getAllOnes() when we already have getAllOnesValue().
getAllOnesValue has to reinspect the type to determine int vs FP. We also can't override on IntegerType* to return a ConstantInt*. Not sure if any of the callers of ConstantInt::get/getSigned was using that feature.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147558/new/
https://reviews.llvm.org/D147558
More information about the llvm-commits
mailing list