[PATCH] D11393: [X86] Allow X86::COND_NE_OR_P and X86::COND_NP_OR_E to be reversed.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 13 15:52:19 PST 2016
davidxl added inline comments.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:4055
@@ +4054,3 @@
+ // is named COND_P_AND_NE.
+ BranchCode = X86::COND_P_AND_NE;
+ } else if ((OldBranchCode == X86::COND_NP && BranchCode == X86::COND_NE) ||
----------------
For B1, the condition is NP_OR_E, so why not using COND_NP_OR_E as the branch code? Is the new code needed? (after swapping TBB and FBB)
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:4059
@@ +4058,3 @@
+ // See comments above for X86::COND_P_AND_NE.
+ BranchCode = X86::COND_E_AND_NP;
+ } else
----------------
To make sure the pattern is fully checked, I think NewTBB != TBB is also needed.
http://reviews.llvm.org/D11393
More information about the llvm-commits
mailing list