it would be nice of ctlz were lowered to bsf etc.
authorChris Lattner <sabre@nondot.org>
Tue, 14 Nov 2006 08:08:46 +0000 (08:08 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 14 Nov 2006 08:08:46 +0000 (08:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31730 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/README.txt

index 834a47c51b9d350fb79013836234d80b3e092bcb..629d30336bcaaf27d4dbe93fe69332fe49a9a2b2 100644 (file)
@@ -114,6 +114,15 @@ ctz:
 however, check that these are defined for 0 and 32.  Our intrinsics are, GCC's
 aren't.
 
+Another example (use predsimplify to eliminate a select):
+
+int foo (unsigned long j) {
+  if (j)
+    return __builtin_ffs (j) - 1;
+  else
+    return 0;
+}
+
 //===---------------------------------------------------------------------===//
 
 Use push/pop instructions in prolog/epilog sequences instead of stores off