[all-commits] [llvm/llvm-project] d97591: [X86] Don't exit from foldOffsetIntoAddress if the...

topperc via All-commits all-commits at lists.llvm.org
Sat Feb 1 11:36:04 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d975910c50fb05b466f64beab1d43f8e8402bbdd
      https://github.com/llvm/llvm-project/commit/d975910c50fb05b466f64beab1d43f8e8402bbdd
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-02-01 (Sat, 01 Feb 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp

  Log Message:
  -----------
  [X86] Don't exit from foldOffsetIntoAddress if the Offset is 0, but AM.Disp is non-zero.

This is an alternate fix for the issue D73606 was trying to
solve.

The main issue here is that we bailed out of
foldOffsetIntoAddress if Offset is 0. But if we just found a
symbolic displacement and AM.Disp became non-zero
earlier, we still need to validate that AM.Disp with the symbolic
displacement.

This is my second attempt at committing this after failing
build bots previously. One thing I realized about the previous
attempt is that its possible that AM.Disp is already non-zero
and the new Offset changes it back to zero. In that case my
previous attempt failed to update AM.Disp to zero. So this patch
removes the early out for 0 and appropriately handle the 0 case
in each check so we still update AM.Disp at the end.




More information about the All-commits mailing list