[llvm-commits] CVS: llvm-www/OpenProjects.html

Rafael Espindola espindola at google.com
Tue Jun 16 04:35:56 PDT 2009


> +  <li><a href="http://nondot.org/sabre/LLVMNotes/BuiltinUnreachable.txt">Value
> +      assertions</a> (also <a href="http://llvm.org/PR810">PR810</a>).</li>
>  </ol>

The example

   int test(char *f) {
     if (*f)
       __builtin_unreachable ();
     return f ? 1 : 0;
   }


should probably be

   int test(char *f) {
     if (*f)
       __builtin_unreachable ();
     return *f ? 0 : 1;
   }

for it to be reduced to "return 1".

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047




More information about the llvm-commits mailing list