The manual is unclear on the details of this. It's not
clear to me if denormals are not allowed with clamp,
or if that is only omod. Not allowing denorms for
fp16 or fp64 isn't useful so I also question if that
is really a restriction. Same with whether this is valid
without IEEE mode enabled.
Details
Details
- Reviewers
arsenm
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I only know that exceptions won't occur with the clamp modifier. No idea about denormals.
Also, shouldn't this handle MIN as well?
Comment Actions
There's no practical reason to handle min. The higher level operation minnum(x, x) is folded to x in the IR, so this should only be appearing when we emit this pattern for the clamp operation, where max was arbitrarily chosen.
Comment Actions
I don't understand. FPClamp(x) = min(max(x, 0), 1). I don't see min handled here, that's why I asked.
Comment Actions
This isn't directly matching the clamp pattern. In the DAG we match that to AMDGPUISD::CLAMP. We emit that as the max(x, x) clamp. We match that here
test/CodeGen/AMDGPU/clamp.ll | ||
---|---|---|
108–109 | The source modifier is used here, so I don't think so |
Does this FIXME still make sense? Not sure what it was trying to say in the first place.