[LLVMdev] Floating point ordered and unordered comparisons

sundeepk at codeaurora.org sundeepk at codeaurora.org
Tue Jul 9 15:00:44 PDT 2013


Hi All,

I noticed LLVM target independent side is converting an ordered less than
"setolt"  into unordered greater than "setuge" operation. There are no
target hooks to control going from the ordered mode into unordered.

I am trying to figure out the best way to support unordered operation on
Hexagon. We don't have a single instruction to do unordered operation. So
we will have to break it down into 2 instructions - check if unordered
followed by the actual operation.

I looked at X86 and ARM and it seems like both targes support unordered
comparisons. I would prefer target independent part not to transform
ordered ops into unordered. Is it a good idea? How do other targets
support this feature?

I don't have a lot of experience dealing with floating points. I will
really appreciate any help here.

Thanks,
Sundeep




More information about the llvm-dev mailing list