Commit 1ef8e8b4 authored by Craig Topper's avatar Craig Topper
Browse files

[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 passes fold-add-pcrel.ll.

Differential Revision: https://reviews.llvm.org/D73608
parent 3e24242a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment