[LLVMbugs] [Bug 2682] llvm-gcc fails to find that an argument to __builtin_prefetch is a constant

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sun Oct 5 15:53:55 PDT 2008


Chris Lattner <clattner at apple.com> changed:

           What    |Removed                     |Added
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #5 from Chris Lattner <clattner at apple.com>  2008-10-05 17:53:54 ---
This is one of those cases where GCC changes what code it accepts based on how
its optimizer evolves.  It will basically accept any builtin_prefetch as long
as the GIMPLE level optimizers are able to eliminate it, and does the checking
after the full optimizer pass runs.  A better way to do this is with macros and
with __builtin_choose_expr. __builtin_choose_expr( __builtin_constant_p, ...)
is guaranteed to not evaluate the subexpression that is not chosen.

The user should change their code, sorry.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list