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

Unified Diff: src/IceTargetLoweringARM32.cpp

Issue 1639923002: Subzero. ARM32. Vector lowering. Subtract. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 11 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
Index: src/IceTargetLoweringARM32.cpp
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp
index 5e7bdfd11fc04771f337805164e13b05d1a6ca56..1951bb08a746b1210f5950fb130a33ac8e6a5a13 100644
--- a/src/IceTargetLoweringARM32.cpp
+++ b/src/IceTargetLoweringARM32.cpp
@@ -2805,6 +2805,8 @@ void TargetARM32::lowerArithmetic(const InstArithmetic *Instr) {
// Explicitly whitelist vector instructions we have implemented/enabled.
case InstArithmetic::Fadd:
case InstArithmetic::Add:
+ case InstArithmetic::Fsub:
+ case InstArithmetic::Sub:
break;
}
}
@@ -2974,6 +2976,7 @@ void TargetARM32::lowerArithmetic(const InstArithmetic *Instr) {
}
case InstArithmetic::Sub: {
if (const Inst *Src1Producer = Computations.getProducerOf(Src1)) {
+ assert(!isVectorType(DestTy));
Variable *Src0R = legalizeToReg(Src0);
Variable *Src1R = legalizeToReg(Src1Producer->getSrc(0));
Variable *Src2R = legalizeToReg(Src1Producer->getSrc(1));
@@ -2983,6 +2986,7 @@ void TargetARM32::lowerArithmetic(const InstArithmetic *Instr) {
}
if (Srcs.hasConstOperand()) {
+ assert(!isVectorType(DestTy));
if (Srcs.immediateIsFlexEncodable()) {
Variable *Src0R = Srcs.src0R(this);
Operand *Src1RF = Srcs.src1RF(this);
@@ -3004,7 +3008,11 @@ void TargetARM32::lowerArithmetic(const InstArithmetic *Instr) {
}
Variable *Src0R = Srcs.unswappedSrc0R(this);
Variable *Src1R = Srcs.unswappedSrc1R(this);
- _sub(T, Src0R, Src1R);
+ if (isVectorType(DestTy)) {
+ _vsub(T, Src0R, Src1R);
+ } else {
+ _sub(T, Src0R, Src1R);
+ }
_mov(Dest, T);
return;
}

Powered by Google App Engine
This is Rietveld 408576698