Operand 0 is the condition, not the true value.
Use op 1 and op 2 as the correct values.
Differential D46343
[CFLGraph] Fixed Select instruction handling xbolva00 on May 1 2018, 6:23 PM. Authored by
Details Operand 0 is the condition, not the true value. Use op 1 and op 2 as the correct values.
Diff Detail
Event TimelineComment Actions Can you check even this patch, @rjmccall , please? This old bug was found by @efriedma https://reviews.llvm.org/D46259 Comment Actions I don't know why you're CC'ing me on these patches in LLVM code I don't know anything about, and I think if I keep reviewing them you're going to keep doing it, and I don't have time to review a bunch of miscellaneous LLVM patches, sorry. Comment Actions I have no idea this isn't an area I'm familar with. The code is for ConstantExpr selects, but the select you created isn't a ConstantExpr. Almost the entire visitConstantExpr function is showing no coverage on the coverage bots http://llvm.org/reports/coverage/lib/Analysis/CFLGraph.h.gcov.html so I don't even know what to do.
Comment Actions Sorry, I tried to make test case as: @a = common dso_local global i32 0, align 4 ; Function Attrs: norecurse nounwind readnone uwtable select i1 false, i32* @b, i32* @a ret void } But I got same output with and without patch :( Since I am unable to create proper test case, I will just remove current test and leave this as is - whether you accept it without patch or we can leave it buggy.. Comment Actions Hi, and thanks for the patch! I'm pretty familiar with this code and am happy to review it when I get back from vacation next week. |