[LLVMbugs] [Bug 65] C front-end miscompiles the builtin_expect intrinsic!

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Tue Oct 28 23:12:54 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=65

sabre at nondot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From sabre at nondot.org  2003-10-29 01:12 -------
This is fixed by the following patch, which has been installed in the new
front-ends.

$ diff -u llvm-expand.c.bad llvm-expand.c
--- llvm-expand.c.bad   2003-10-29 01:11:38.000000000 -0600
+++ llvm-expand.c       2003-10-29 01:09:19.000000000 -0600
@@ -4163,7 +4163,7 @@
   case BUILT_IN_EXPECT:  /* LLVM: Ignore the hint, just expand the expr */
     if (arglist == NULL_TREE || TREE_CHAIN (arglist) == NULL_TREE)
       return 0;
-    return llvm_expand_expr(Fn, TREE_VALUE (TREE_CHAIN (arglist)), DestLoc);
+    return llvm_expand_expr(Fn, TREE_VALUE (arglist), DestLoc);
 #if 0
   case BUILT_IN_PREFETCH:
     expand_builtin_prefetch (arglist);




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list