mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 20:45:06 +00:00
Add (currently disabled) code for canFoldSetCC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18820 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
077f1a8292
commit
81cf150b5d
@ -1016,6 +1016,16 @@ static inline BasicBlock *getBlockAfter(BasicBlock *BB) {
|
||||
///
|
||||
static SetCondInst *canFoldSetCCIntoBranch(Value *V) {
|
||||
return 0; // disable.
|
||||
if (SetCondInst *SCI = dyn_cast<SetCondInst>(V))
|
||||
if (SCI->hasOneUse()) {
|
||||
BranchInst *User = dyn_cast<BranchInst>(SCI->use_back());
|
||||
if (User
|
||||
&& (SCI->getNext() == User)
|
||||
&& (getClassB(SCI->getOperand(0)->getType()) != cLong)
|
||||
&& User->isConditional() && (User->getCondition() == V))
|
||||
return SCI;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// visitBranchInst - Handles conditional and unconditional branches.
|
||||
|
@ -1016,6 +1016,16 @@ static inline BasicBlock *getBlockAfter(BasicBlock *BB) {
|
||||
///
|
||||
static SetCondInst *canFoldSetCCIntoBranch(Value *V) {
|
||||
return 0; // disable.
|
||||
if (SetCondInst *SCI = dyn_cast<SetCondInst>(V))
|
||||
if (SCI->hasOneUse()) {
|
||||
BranchInst *User = dyn_cast<BranchInst>(SCI->use_back());
|
||||
if (User
|
||||
&& (SCI->getNext() == User)
|
||||
&& (getClassB(SCI->getOperand(0)->getType()) != cLong)
|
||||
&& User->isConditional() && (User->getCondition() == V))
|
||||
return SCI;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// visitBranchInst - Handles conditional and unconditional branches.
|
||||
|
Loading…
Reference in New Issue
Block a user