Page MenuHomePhabricator

[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

Unit TestsFailed

TimeTest
60,080 msx64 debian > ThreadSanitizer-x86_64.ThreadSanitizer-x86_64::restore_stack.cpp
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/./bin/clang --driver-mode=g++ -fsanitize=thread -Wall -m64 -msse4.2 -gline-tables-only -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/tsan/../ -std=c++11 -I/var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/tsan/../ -O1 /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/tsan/restore_stack.cpp -o /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/tsan/X86_64Config/Output/restore_stack.cpp.tmp && not /var/lib/buildkite-agent/builds/llvm-project/build/projects/compiler-rt/test/tsan/X86_64Config/Output/restore_stack.cpp.tmp 2>&1 | FileCheck /var/lib/buildkite-agent/builds/llvm-project/compiler-rt/test/tsan/restore_stack.cpp

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.