[PATCH] D84881: GlobalISel: Fix insert point in CSEMIRBuilder unit test
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 11:42:45 PDT 2020
arsenm created this revision.
arsenm added a reviewer: aditya_nandakumar.
Herald added a subscriber: rovka.
Herald added a project: LLVM.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
This was using invalid MIR for the test instructions. The test add was
the first instruction in the block, before the trunc inputs or copies
from physical registers which I assume was not intended.
https://reviews.llvm.org/D84881
Files:
llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
Index: llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
===================================================================
--- llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
+++ llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
@@ -27,8 +27,8 @@
B.setCSEInfo(&CSEInfo);
CSEMIRBuilder CSEB(B.getState());
- CSEB.setInsertPt(*EntryMBB, EntryMBB->begin());
- unsigned AddReg = MRI->createGenericVirtualRegister(s16);
+ CSEB.setInsertPt(B.getMBB(), B.getInsertPt());
+ Register AddReg = MRI->createGenericVirtualRegister(s16);
auto MIBAddCopy =
CSEB.buildInstr(TargetOpcode::G_ADD, {AddReg}, {MIBInput, MIBInput});
EXPECT_EQ(MIBAddCopy->getOpcode(), TargetOpcode::COPY);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84881.281692.patch
Type: text/x-patch
Size: 685 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200729/36b63cc0/attachment.bin>
More information about the llvm-commits
mailing list