https://bugs.llvm.org/show_bug.cgi?id=35774

            Bug ID: 35774
           Summary: "Simplify the CFG" pass moves musttail call from tail
                    position
           Product: libraries
           Version: 5.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Transformation Utilities
          Assignee: unassignedb...@nondot.org
          Reporter: ben...@gmail.com
                CC: llvm-bugs@lists.llvm.org

Created attachment 19611
  --> https://bugs.llvm.org/attachment.cgi?id=19611&action=edit
Files mentioned in the description

The attached file `musttail.ll` branches before making a call. The callee is
the same in both branches, but it is a non-tail call in one branch and a
`musttail` call in the other. The optimizer mistakenly merges the two calls
into a single one before the branch, resulting in incorrect output. Running
`clang -O1 -S -emit-llvm musttail.ll -o musttail_O1.ll` produces an attached
malformed file which is rejected by `llc` for containing a `musttail` call in
non-tail position. I have also attached the output of `opt -O1 -S
-print-after-all musttail.ll`.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to