[PATCH] D43146: [builtins] Fix c?zdi2 on sparc64/Linux and ignore riscv32

James Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 01:59:40 PST 2018


jrtc27 added a comment.

In https://reviews.llvm.org/D43146#1013976, @compnerd wrote:

> Please clang-format the conditional (we keep the operator on the previous line).
>
> I'm wondering if this is becoming a pretty complex set of cases and it's better to just do `__SIZEOF_POINTER__ == 8`.  The question is, how does it impact x86_64 and aarch64, and if those are not impacted in a meaningful way, I think that we should just go ahead and simplify the condition to all 64-bit targets.  Then again, this is a GCC specific codepath, and I'm tempted to say, we can afford the overhead of an additional call.


I guess for 64-bit architectures with a native clz instruction we would expect that instruction to be used for the DI version too, and therefore not be calling `__clzdi2` in the first place? I.e. the only 64-bit platforms which actually call `__clzdi2` are the ones where we have a problem? I could be wrong about this though.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43146





More information about the llvm-commits mailing list