[CGP] Support opaque pointers in address mode fold
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 12 Sep 2021 15:30:40 +0000 (17:30 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 12 Sep 2021 15:43:37 +0000 (17:43 +0200)
commit4189e5fe12b6f9b9036d8faffeab15ad6acd7d99
tree4b3b4d9a19d6cefacb69ba61ffd368c3f0087c4b
parent8e86c0e4f49bcfebd966fd5893d00b093df7f8ba
[CGP] Support opaque pointers in address mode fold

Rather than inspecting the pointer element type, use the access
type of the load/store/atomicrmw/cmpxchg.

In the process of doing this, simplify the logic by storing the
address + type in MemoryUses, rather than an Instruction + Operand
pair (which was then used to fetch the address).
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/CodeGen/X86/merge_store.ll