[llvm-commits] [llvm] r47458 - /llvm/trunk/lib/Target/X86/README.txt

Eli Friedman eli.friedman at gmail.com
Thu Feb 21 15:47:25 PST 2008


(Geh, maybe I should subscribe to llvm-commits... I don't really
commit to llvm very frequently, so I haven't bothered before.)

> Unfortunately we can't do much about this without introducing a x86
> specific ctlz intrinsic. There is a semantics mismatch between
> llvm.ctlz and __builtin_clz. llvm.ctlz returns 32 if the input is zero.

Yeah, which is why I took them out of the file.  We can still do
better on __builtin_ffs, though.  From the gcc docs: "Returns one plus
the index of the least significant 1-bit of x, or if x is zero,
returns zero."  We shouldn't be generating two cmoves for that.

> Try -coalescer-commute-instrs. This is fixed but not turned on. I want
> to make sure the register allocator doesn't do stupid things.

Oh, okay, didn't realize it was implemented but disabled.

-Eli



More information about the llvm-commits mailing list