https://llvm.org/bugs/show_bug.cgi?id=28208
Bug ID: 28208 Summary: Reassociate reports change made incorrectly Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Scalar Optimizations Assignee: unassignedb...@nondot.org Reporter: apilipe...@azulsystems.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Reassociate pass returns true with no change made on the following function: define i64 @test(i64 %a, i64 %b) { %1 = and i64 %b, %a ret i64 %1 } opt -S reassociate.ll -reassociate -debug-pass=Executions [2016-06-20 08:55:35.332437000] 0x1906670 Executing Pass 'Function Pass Manager' on Module 'simple.ll'... [2016-06-20 08:55:35.332704000] 0x1908770 Executing Pass 'Reassociate expressions' on Function 'test'... [2016-06-20 08:55:35.333682000] 0x1908770 *Made Modification* 'Reassociate expressions' on Function 'test'... [2016-06-20 08:55:35.333792000] 0x1908770 Freeing Pass 'Reassociate expressions' on Function 'test'... [2016-06-20 08:55:35.333837000] 0x1908770 Executing Pass 'Module Verifier' on Function 'test'... [2016-06-20 08:55:35.334012000] 0x1908770 Freeing Pass 'Module Verifier' on Function 'test'... [2016-06-20 08:55:35.334048000] 0x1906670 Made Modification 'Function Pass Manager' on Module 'simple.ll'... [2016-06-20 08:55:35.334077000] 0x1906670 Executing Pass 'Print module to stderr' on Module 'simple.ll'... It happens because it performs two distinct transformations which nullify each other (canonicalizeOperands swaps arguments of an and and then ReassociateExpression swaps them back). -- 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