This is an archive of the discontinued LLVM Phabricator instance.

[clang codegen][AArch64] Use llvm.aarch64.neon.fcvtzs/u where it's necessary
ClosedPublic

Authored by efriedma on Jul 27 2020, 2:15 PM.

Details

Summary

fptosi/fptoui have similar, but not identical, semantics. In particular, the behavior on overflow is different.

Fixes https://bugs.llvm.org/show_bug.cgi?id=46844 for 64-bit. (This is missing the corresponding change for 32-bit; the 32-bit equivalent to llvm.aarch64.neon.fcvtzs isn't implemented, as far as I can tell.)

Diff Detail

Event Timeline

efriedma created this revision.Jul 27 2020, 2:15 PM
SjoerdMeijer accepted this revision.Jul 28 2020, 1:06 AM

Cheers, LGTM

This revision is now accepted and ready to land.Jul 28 2020, 1:06 AM
This revision was landed with ongoing or failed builds.Jul 30 2020, 3:42 PM
This revision was automatically updated to reflect the committed changes.

Hey Eli,

Looks like this is causing the test-suite build to fail. Can you please take a look.

Refer to http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O3/8035/consoleFull http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-aarch64-O3/8035/consoleFull.

FAILED: SingleSource/UnitTests/Vector/AArch64/CMakeFiles/aarch64_neon_intrinsics.dir/aarch64_neon_intrinsics.c.o
/Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite-build/tools/timeit --summary SingleSource/UnitTests/Vector/AArch64/CMakeFiles/aarch64_neon_intrinsics.dir/aarch64_neon_intrinsics.c.o.time /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/compiler/bin/clang -DNDEBUG -B /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin -Wno-unused-command-line-argument -mllvm -verify-machineinstrs -O3 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.5.sdk -w -Werror=date-time -std=c99 -MD -MT SingleSource/UnitTests/Vector/AArch64/CMakeFiles/aarch64_neon_intrinsics.dir/aarch64_neon_intrinsics.c.o -MF SingleSource/UnitTests/Vector/AArch64/CMakeFiles/aarch64_neon_intrinsics.dir/aarch64_neon_intrinsics.c.o.d -o SingleSource/UnitTests/Vector/AArch64/CMakeFiles/aarch64_neon_intrinsics.dir/aarch64_neon_intrinsics.c.o -c /Users/buildslave/jenkins/workspace/test-suite-verify-machineinstrs-aarch64-O3/test-suite/SingleSource/UnitTests/Vector/AArch64/aarch64_neon_intrinsics.c
fatal error: error in backend: Cannot select: intrinsic %llvm.aarch64.neon.fcvtzs

Thanks
Azhar

efriedma added a comment.EditedAug 3 2020, 1:06 PM

Committed dca23ed; should be fixed now.

-Eli