[PATCH] D29338: AMDGPU: Basic folds for fmed3 intrinsic

Artem Tamazov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 08:53:16 PST 2017


artem.tamazov added a comment.

Clarification:

In https://reviews.llvm.org/D29338#687325, @artem.tamazov wrote:

> ...**Is IEEE compliance required for llvm.amdgcn.fmed3.f32? **If it is, we shall look to formal definition of fmed3 and check carefully.
>  For example, transformations like fmed3(0.0, 1.0, x) -> fmed3(x, 0.0, 1.0) may be non-IEEE-compliant w.r.t. sNANs when shader is in IEEE mode.
>  That depends on expected semantics of fmed3, of course. For example, this is how V_MED3_F semantics is defined for Gfx8...


...and, in IEEE mode, V_MED3_F32(0.0, 1.0, sNAN) yelds qNAN, while V_MED3_F32(sNAN, 0.0, 1.0) produces 1.0.


https://reviews.llvm.org/D29338





More information about the llvm-commits mailing list