aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-06-25 05:42:32 +0000
committerZachary Turner <zturner@google.com>2014-06-25 05:42:32 +0000
commit736d4d85db80d2583ac12daa1eac59b0c010e1af (patch)
treecadf1e3ed5632fe60feb4b1c438b6275e6351a26 /llvm/lib/CodeGen/MachineFunction.cpp
parent6804d450cdbb7c44c392c7009d1f2c4ca3d04ce6 (diff)
downloadllvm-736d4d85db80d2583ac12daa1eac59b0c010e1af.zip
llvm-736d4d85db80d2583ac12daa1eac59b0c010e1af.tar.gz
llvm-736d4d85db80d2583ac12daa1eac59b0c010e1af.tar.bz2
Replace GCC-specific intrinsic with portable alternative.
Not all supported compilers have GCC intrinsics, so this patch uses the correct portable alternative. Additionally, this patch fixes an off-by-one error. __builtin_ffs returns the 1-based index of the least-significant 1-bit, but the function expects the base 2 logarithm of the number, which is equivalent to the 0-based index of the least-significant 1-bit. Reviewed by: Keno Fischer Differential Revision: http://reviews.llvm.org/D4284 llvm-svn: 211669
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions