[PATCH] Remove redundent register mov by improving TwoAddressInstructionPass
Quentin Colombet
qcolombet at apple.com
Fri Feb 27 13:58:15 PST 2015
Hi Wei,
Looks almost good :).
I should have pay more attention to the tests, sorry about that. Please make them more verbose and do not rely on basic block labels.
Thanks,
-Quentin
REPOSITORY
rL LLVM
================
Comment at: test/CodeGen/X86/twoaddr-coalesce-3.ll:22
@@ +21,3 @@
+; CHECK-LABEL: foo:
+; CHECK: .LBB0_2:
+; CHECK: mov
----------------
I do not think we usually rely on basic block labels. Instead, check for branch instructions to know when you cross a basic block boundary.
================
Comment at: test/CodeGen/X86/twoaddr-coalesce-3.ll:23
@@ +22,3 @@
+; CHECK: .LBB0_2:
+; CHECK: mov
+; CHECK-NOT: mov
----------------
Check the actual chain of computation, i.e., surrounding instruction + operands, to be sure we generate correct code.
http://reviews.llvm.org/D7806
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list