Closed rengolin closed 5 years ago
Tested locally, fixed. Thanks!
Fixed in clang svn r121447.
I can reproduce this on trunk. It's a problem in clang. The vacgtd intrinsic is not overloaded, but clang is treating it as if it is. You can see this in the definition produced by clang:
declare <2 x i32> @llvm.arm.neon.vacgtd.v2i32(<2 x float>, <2 x float>)
versus llvm-gcc:
declare <2 x i32> @llvm.arm.neon.vacgtd(<2 x float>, <2 x float>) nounwind readnone
vacged has the same issue.
Extended Description
Compare absolute intrinsics, as defined in ARMInstrNEON.td (and lowered by Clang), is not being converted to a NEON instruction in the back-end, and silently becoming a function call to the LLVM intrinsic (ex. "llvm.arm.neon.vacged.v2i32")
Compile example:
$ clang -ccc-host-triple armv7a-none-eabi -ccc-gcc-name arm-none-eabi-gcc -mfloat-abi=hard -w -S abscomp.c -o - | grep llvm.arm.neon
Should show instructions, show calls to LLVM intrinsic.