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

            Bug ID: 49244
           Summary: Suboptimal lowering of `mul x, 0b111....` when using
                    SelectionDAG
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: M68k
          Assignee: unassignedb...@nondot.org
          Reporter: miny...@uci.edu
                CC: glaub...@physik.fu-berlin.de,
                    llvm-bugs@lists.llvm.org, miny...@uci.edu

As described in test/CodeGen/M68k/ASM/Arith/imul-neg.ll, when multiplying value
`x` with 2^n - 1 integer, the result will be `-x`, which is preferred to be
lowered to `neg x` instruction. However, SelectionDAG ISel will generate `sub
0, x` (FastISel doesn't have this problem though).

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

Reply via email to