Basic constant propagation.
This commit is contained in:
@@ -986,7 +986,7 @@ XEEMITTER(rlwimix, 0x50000000, M )(PPCFunctionBuilder& f, InstrData& i) {
|
||||
}
|
||||
v = f.ZeroExtend(v, INT64_TYPE);
|
||||
Value* ra = f.LoadGPR(i.M.RA);
|
||||
v = f.Or(v, f.And(f.LoadGPR(i.M.RA), f.LoadConstant(~m)));
|
||||
v = f.Or(v, f.And(f.LoadGPR(i.M.RA), f.LoadConstant((~(uint64_t)m))));
|
||||
if (i.M.Rc) {
|
||||
f.UpdateCR(0, v);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,8 @@ PPCTranslator::PPCTranslator(PPCFrontend* frontend) :
|
||||
compiler_ = new Compiler(frontend->runtime());
|
||||
|
||||
compiler_->AddPass(new passes::ContextPromotionPass());
|
||||
//compiler_->AddPass(new passes::ConstantPropagationPass());
|
||||
compiler_->AddPass(new passes::SimplificationPass());
|
||||
compiler_->AddPass(new passes::ConstantPropagationPass());
|
||||
//compiler_->AddPass(new passes::TypePropagationPass());
|
||||
//compiler_->AddPass(new passes::ByteSwapEliminationPass());
|
||||
compiler_->AddPass(new passes::SimplificationPass());
|
||||
|
||||
Reference in New Issue
Block a user