[PATCH] D137778: [GlobalISel] Correct constant type in matchReassocConstantInnerLHS

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 03:33:24 PST 2022


bcl5980 created this revision.
bcl5980 added reviewers: arsenm, paquette, aemerson.
Herald added a subscriber: hiraditya.
Herald added a project: All.
bcl5980 requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

When we match a pattern from m_GCst, the register type could be different from original op. So we can't replace the original op to vreg direct.
This code create a new constant with original op type then replace the original op.

Fix #58906


https://reviews.llvm.org/D137778

Files:
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-ptradd-chain.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137778.474495.patch
Type: text/x-patch
Size: 6386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221110/f53c016f/attachment.bin>


More information about the llvm-commits mailing list