summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IfConversion.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-07-10 17:50:43 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-07-10 17:50:43 +0000
commit11ce02dbddf4b6629b8537f89d742c98c3c2bce2 (patch)
tree04a59064e21a2d4a0c55a3da3b13c82bdf3a7e84 /lib/CodeGen/IfConversion.cpp
parent7a616a101225ea33d72f6931b205aa27e1cf919c (diff)
downloadllvm-11ce02dbddf4b6629b8537f89d742c98c3c2bce2.tar.gz
llvm-11ce02dbddf4b6629b8537f89d742c98c3c2bce2.tar.bz2
llvm-11ce02dbddf4b6629b8537f89d742c98c3c2bce2.tar.xz
Somehow this wasn't committed last time. M_CLOBBERS_PRED is gone.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@38495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IfConversion.cpp')
-rw-r--r--lib/CodeGen/IfConversion.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/IfConversion.cpp b/lib/CodeGen/IfConversion.cpp
index b05f6630ea..3bddc771ab 100644
--- a/lib/CodeGen/IfConversion.cpp
+++ b/lib/CodeGen/IfConversion.cpp
@@ -84,7 +84,7 @@ namespace {
/// IsBrAnalyzable - True if AnalyzeBranch() returns false.
/// HasFallThrough - True if BB may fallthrough to the following BB.
/// IsUnpredicable - True if BB is known to be unpredicable.
- /// ClobbersPredicate- True if BB would modify the predicate (e.g. has
+ /// ClobbersPred - True if BB could modify predicates (e.g. has
/// cmp, call, etc.)
/// NonPredSize - Number of non-predicated instructions.
/// BB - Corresponding MachineBasicBlock.
@@ -588,7 +588,10 @@ void IfConverter::ScanInstructions(BBInfo &BBI) {
return;
}
- if (TID->Flags & M_CLOBBERS_PRED)
+ // FIXME: Make use of PredDefs? e.g. ADDC, SUBC sets predicates but are
+ // still potentially predicable.
+ std::vector<MachineOperand> PredDefs;
+ if (TII->DefinesPredicate(I, PredDefs))
BBI.ClobbersPred = true;
if ((TID->Flags & M_PREDICABLE) == 0) {