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

            Bug ID: 48709
           Summary: Miscompile due to BasicAA/ValueTracking using wrong DT
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Global Analyses
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

After merging patches that used DominatorTree information in more places in
BasicAA/ValueTracking (such as
https://reviews.llvm.org/rGb21840751278128ef6942074ae89ea63c9c6ac58) we started
to see miscompiles downstream for our OOT target.

By adding a DT->verify() check before every use of DT in BasicAliasAnalysis and
VelueTracking it turned out that lots of lit tests would complain also in-tree.
So it is assumed that one could get miscompiles also for other targets, as
using an invalid DominatorTree during analysis could be dangerous.

Early analysis show that problem is related to the calculation of "last user"
in the legacy pass manager. Sometimes the FunctionAliasAnalysis (and BasicAA)
is preserved and kept for a longer time compared to the DominatorTree, possibly
due to not using "addRequiredTransitive" when specifying pass dependencies for
the chained analysis usage.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to