This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Support test data class intrinsic of 128-bit float
ClosedPublic

Authored by qiucf on Nov 16 2022, 1:01 AM.

Details

Summary

We've exploited test data class instructions for f32 f64 v2f64` and v4f32. This patch unifies the LLVM intrinsic into the same ppc_test_data_class and add support for 128-bit precision float values using xststdcqp.

Vector versions of the intrinsic can't be unified because they return vector int instead of int.

Diff Detail

Event Timeline

qiucf created this revision.Nov 16 2022, 1:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2022, 1:01 AM
qiucf requested review of this revision.Nov 16 2022, 1:01 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 16 2022, 1:01 AM

The error message needs to be updated too:

def err_ppc_invalid_test_data_class_type : Error<
  "expected a 'float' or 'double' for the first argument">;

And can we add a test case for ibm float128 in the clang?

qiucf updated this revision to Diff 477375.Nov 22 2022, 8:23 PM

Change error message regarding __float128.

shchenz accepted this revision as: shchenz.Dec 5 2022, 7:14 PM

LGTM. Thanks.

This revision is now accepted and ready to land.Dec 5 2022, 7:14 PM
This revision was landed with ongoing or failed builds.Dec 7 2022, 12:46 AM
This revision was automatically updated to reflect the committed changes.