llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.65k stars 11.84k forks source link

NEON compare absolute not being lowered #8856

Closed rengolin closed 5 years ago

rengolin commented 14 years ago
Bugzilla Link 8484
Resolution FIXED
Resolved on Nov 07, 2018 00:22
Version trunk
OS Linux
Attachments example
CC @asl

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.

rengolin commented 13 years ago

Tested locally, fixed. Thanks!

llvmbot commented 13 years ago

Fixed in clang svn r121447.

llvmbot commented 13 years ago

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.