Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1262003003: Subzero: Fix x86 lowering for shift-by-relocatable-constant. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/arith.ll » ('j') | tests_lit/llvm2ice_tests/arith.ll » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringX86BaseImpl.h
diff --git a/src/IceTargetLoweringX86BaseImpl.h b/src/IceTargetLoweringX86BaseImpl.h
index 85c8c712848fea00c1e1c351550c835812d018dc..f275c3aec6d14a7658e0fe6e5af8b503f6ccdcf3 100644
--- a/src/IceTargetLoweringX86BaseImpl.h
+++ b/src/IceTargetLoweringX86BaseImpl.h
@@ -1835,21 +1835,21 @@ void TargetX86Base<Machine>::lowerArithmetic(const InstArithmetic *Inst) {
break;
case InstArithmetic::Shl:
_mov(T, Src0);
- if (!llvm::isa<Constant>(Src1))
+ if (!llvm::isa<ConstantInteger32>(Src1))
Src1 = legalizeToReg(Src1, Traits::RegisterSet::Reg_ecx);
_shl(T, Src1);
_mov(Dest, T);
break;
case InstArithmetic::Lshr:
_mov(T, Src0);
- if (!llvm::isa<Constant>(Src1))
+ if (!llvm::isa<ConstantInteger32>(Src1))
Src1 = legalizeToReg(Src1, Traits::RegisterSet::Reg_ecx);
_shr(T, Src1);
_mov(Dest, T);
break;
case InstArithmetic::Ashr:
_mov(T, Src0);
- if (!llvm::isa<Constant>(Src1))
+ if (!llvm::isa<ConstantInteger32>(Src1))
Src1 = legalizeToReg(Src1, Traits::RegisterSet::Reg_ecx);
_sar(T, Src1);
_mov(Dest, T);
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/arith.ll » ('j') | tests_lit/llvm2ice_tests/arith.ll » ('J')

Powered by Google App Engine
This is Rietveld 408576698