[PATCH] D155372: [clang][Interp] Implement __builtin_isfinite
Timm Bäder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 17 22:58:11 PDT 2023
tbaeder added inline comments.
================
Comment at: clang/lib/AST/Interp/InterpBuiltin.cpp:194
+
+ S.Stk.push<Integral<32, true>>(Integral<32, true>::from(Arg.isFinite()));
+ return true;
----------------
aaron.ballman wrote:
> We have platforms on which the width of an integer is not 32-bits; because this is pushing values back onto the stack, won't we run into some odd issues where `builtin + 1` would be adding a 32-bit and a 16-bit value?
Yes, you don't even need to add anything for it to fail. I can add a way of doing that in a follow-up commit. And/or add an assertion now.
Also, what platform would that be? So I can add a test later.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155372/new/
https://reviews.llvm.org/D155372
More information about the cfe-commits
mailing list