Handle constant folding and idempotent folding. Not sure
this is an appropriate use of undef for the inf/nan case. The
C version says the second result is "unspecified". The AMDGPU
instruction returns 0.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/lib/Analysis/ConstantFolding.cpp | ||
---|---|---|
3314 | I suggest we use 0 here to avoid adding another use of undef. Also, it's unclear if undef is ok or if we would need freeze poison. The rest, LGTM! |
Comment Actions
APFloat actually uses INT_MIN and INT_MAX, but 0 seems better? I don't know why this isn't just specified to return the maximum exponent
I suggest we use 0 here to avoid adding another use of undef. Also, it's unclear if undef is ok or if we would need freeze poison.
The rest, LGTM!