HomePhabricator

[X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization

Authored by Carrot on Jun 11 2021, 9:43 AM.

Description

[X86FixupLEAs] Sub register usage of LEA dest should block LEA/SUB optimization

In function searchALUInst, sub register usage of LEA dest should also block LEA/SUB optimization, otherwise the sub register usage gets an undefined value.

This patch fixes https://bugs.llvm.org/show_bug.cgi?id=50615.

Differential Revision: https://reviews.llvm.org/D103922