[PATCH] D113107: Support of expression granularity for _Float16.

Zahira Ammarguellat via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 14:35:04 PDT 2022


zahiraam added a comment.

This is a reduced test case from the codegen/complex-strictfp.c

_Complex double g1, g2;
double D;

void foo(void) {

  g1 = g1 + D;

}

The issue is that we are calling in VisitBinAssign the function  EmitUnpromotion (since promotionTy is null). This creates 2 constrained (-ffp-exception-behavior=maytrap used) fptrunc instructions. The verifier for Intrinsic::experimental_constrained_fptrunc fails at this check:
https://github.com/intel/llvm/blob/sycl/llvm/lib/IR/Verifier.cpp#L5885
Is the call for EmitUnpromotion at the right place? Or should VisitBinAssign be treated the same way than the operator of HANDLEBINOP? Since in this case we are in the unpromoted path, we don't really need to add those fptrunc? Any thoughts?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113107/new/

https://reviews.llvm.org/D113107



More information about the cfe-commits mailing list