[PATCH] D141373: MachineIRBuilder: Add buildMergeValues. NFC
Diana Picus via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 04:25:01 PST 2023
rovka created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Add a `buildMergeValues` method that unconditionally builds a
G_MERGE_VALUES instruction, as opposed to `buildMergeLikeOp` which may
decide on a different opcode based on the input types.
I haven't audited all the uses of `buildMergeLikeOp` to see if they can
be replaced with `buildMergeValues`, but I did find a couple of obvious
ones where we check that we're merging scalars right before calling
`buildMerge`.
This is a follow-up suggested in https://reviews.llvm.org/D140964
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141373
Files:
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141373.487749.patch
Type: text/x-patch
Size: 5085 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230110/e87c37aa/attachment.bin>
More information about the llvm-commits
mailing list