[flang-commits] [PATCH] D129296: Lower mask intrinsics
Tarun Prabhu via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Jul 8 06:53:12 PDT 2022
tarunprabhu added a comment.
In D129296#3638440 <https://reviews.llvm.org/D129296#3638440>, @jeanPerier wrote:
> Where do you get the "If I < 0 or I > BIT_SIZE(KIND), the result will always be 0." requirement ? My understanding from the standard it is non conforming if I < 0 or I > BIT_SIZE(KIND), and so there is no specified behavior.
The same point was raised by @vdonaldson on another patch (https://reviews.llvm.org/D129316) which makes the same assumption. If the experts can weigh in on that patch, I'll apply similar changes to this one.
================
Comment at: flang/lib/Lower/IntrinsicCall.cpp:3193
+ loc, resultType, resultType.getIntOrFloatBitWidth());
+ if (args[1]) {
+ mlir::Value eight = builder.createIntegerConstant(loc, resultType, 8);
----------------
jeanPerier wrote:
> I am surprised you have to do that here. the KIND argument, if present, must already be represented in the resultType that semantics selected for the intrinsic. So I think you should be able to remove this case (otherwise, this would indicate some bug with resultType).
Duh! I didn't check to see if the resultType was already correct. If it is as expected, I'll remove the check.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129296/new/
https://reviews.llvm.org/D129296
More information about the flang-commits
mailing list