Page MenuHomePhabricator

[PowerPC] Add exception constraint to FP arithmetic
ClosedPublic

Authored by qiucf on Jun 27 2019, 8:26 PM.

Details

Summary

D55506 introduced concept of strict-fp nodes into LLVM. This patch is to add strict-fp exception support to PowerPC backend, and only contains basic arithmetic operations (+, -, *, /). Patch for the rest of floating point operations will be in following patches.

Diff Detail

Unit TestsFailed

TimeTest
10 msLLVM.Bindings/Go::go.test
Script: -- : 'RUN: at line 1'; llvm-go test llvm.org/llvm/bindings/go/llvm
3,390 mslibc++.std/thread/futures/futures_async::async.pass.cpp
Compiled With: '/usr/bin/clang++ -o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/projects/libcxx/test/std/thread/futures/futures.async/Output/async.pass.cpp.o -x c++ /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/test/std/thread/futures/futures.async/async.pass.cpp -c -v -ftemplate-depth=270 -Werror=thread-safety -std=c++2a -include /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/test/support/nasty_macros.h -nostdinc++ -I/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/include -I/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/projects/libcxx/include/c++build -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/test/support -DLIBCXX_FILESYSTEM_STATIC_TEST_ROOT="/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/test/std/input.output/filesystems/Inputs/static_test_env" -DLIBCXX_FILESYSTEM_DYNAMIC_TEST_ROOT="/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/projects/libcxx/test/filesystem/Output/dynamic_env" -DLIBCXX_FILESYSTEM_DYNAMIC_TEST_HELPER="/usr/bin/python /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/libcxx/test/support/filesystem_dynamic_test_helper.py" -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -Wall -Wextra -Werror -Wuser-defined-warnings -Wshadow -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -c && /usr/bin/clang++ -o /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/projects/libcxx/test/std/thread/futures/futures.async/Output/async.pass.cpp.exe /mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/projects/libcxx/test/std/thread/futures/futures.async/Output/async.pass.cpp.o -v -ftemplate-depth=270 -L/mnt/disks/ssd0/agent/workspace/amd64_debian_testing_clang8/build/./lib -Wl,-rpath…

Event Timeline

wuzish created this revision.Jun 27 2019, 8:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2019, 8:26 PM
wuzish updated this revision to Diff 207476.Jul 1 2019, 11:00 PM

update testcases.

wuzish added a reviewer: kpn.Jul 3 2019, 11:11 PM
jsji added a reviewer: Restricted Project.Aug 27 2019, 7:57 PM
qiucf commandeered this revision.Oct 11 2019, 7:26 PM
qiucf added a reviewer: wuzish.
qiucf updated this revision to Diff 236310.Jan 6 2020, 1:26 AM
qiucf retitled this revision from [PowerPC] Add constraint fp support about exception part for operation +-*/ to [PowerPC] Add exception constraint to FP arithmetic.
qiucf edited the summary of this revision. (Show Details)

Rebase and fix conflicts.

Unit tests: pass. 61258 tests passed, 0 failed and 736 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

qiucf updated this revision to Diff 238170.Jan 14 2020, 10:41 PM

Fix a test error

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: console-log.txt

qiucf updated this revision to Diff 244392.Feb 13 2020, 4:53 AM
  • Rename and combine some cases together.
  • Add some more cases.

I don't know enough about PowerPC to review the check in the tests, but the basic constrained intrinsic handling looks correct.

qiucf added a comment.Sun, Mar 1, 10:36 PM

I don't know enough about PowerPC to review the check in the tests, but the basic constrained intrinsic handling looks correct.

Thanks! @jsji @nemanjai Could you help to review PPC codegen part?

steven.zhang accepted this revision.Thu, Mar 5, 1:17 AM

LGTM for the ppc side. But please hold on for a couple of days in case someone has other comments.

This revision is now accepted and ready to land.Thu, Mar 5, 1:17 AM
This revision was automatically updated to reflect the committed changes.