[PATCH 1/4] relational: Implement isgreater

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Signed-off-by: Aaron Watry <awatry@gmail.com>

Why not use__builtin_signbit?

I’m wondering: Wouldn’t it be better to extend the builtins to handle vectors properly, or would that break other things?

Jeroen

Unknown. Many of the relational functions that I've been working with
today have been wrapping a comparison of two expressions as a function
call (about as simple as it can get). I honestly don't know if
there's much appeal to calling __builtin_something over just doing the
comparison directly and letting it get parsed/lowered. More things
that can go wrong as a tradeoff for maybe lower compile time?

I've been doing it this way because my LLVM-foo needs improvement and
I'm more comfortable with writing the C version. If we can come up
with a simple template to fix the builtin functions, then I can take a
crack at doing that.

That being said, would it make sense to do that as a follow-on fix so
that these changes can work with existing versions of llvm/clang?

--Aaron

That’s a good point: We want something that works with LLVM 3.4.x So this is probably the way to go.

Jeroen