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

Unified Diff: src/IceTargetLoweringARM32.cpp

Issue 1683243003: ARM32 Vector lowering - scalarize select (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Typo fix Created 4 years, 10 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 | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringARM32.cpp
diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp
index b3e43eb2ff5f6f3d0acb6076361b1df36c6da025..f0aff9b4e86161efaa693d145c208328aae6d592 100644
--- a/src/IceTargetLoweringARM32.cpp
+++ b/src/IceTargetLoweringARM32.cpp
@@ -592,10 +592,10 @@ void TargetARM32::genTargetHelperCallFor(Inst *Instr) {
const InstCast::OpKind CastKind = CastInstr->getCastKind();
if (isVectorType(DestTy)) {
- scalarizeUnaryInstruction(
- Dest, Src0, [this, CastKind](Variable *Dest, Variable *Src) {
+ scalarizeInstruction(
+ Dest, [this, CastKind](Variable *Dest, Variable *Src) {
return Context.insert<InstCast>(CastKind, Dest, Src);
- });
+ }, Src0);
CastInstr->setDeleted();
return;
}
@@ -753,10 +753,11 @@ void TargetARM32::genTargetHelperCallFor(Inst *Instr) {
auto *CmpInstr = llvm::cast<InstIcmp>(Instr);
const auto Condition = CmpInstr->getCondition();
scalarizeInstruction(
- Dest, CmpInstr->getSrc(0), CmpInstr->getSrc(1),
+ Dest,
[this, Condition](Variable *Dest, Variable *Src0, Variable *Src1) {
return Context.insert<InstIcmp>(Condition, Dest, Src0, Src1);
- });
+ },
+ CmpInstr->getSrc(0), CmpInstr->getSrc(1));
CmpInstr->setDeleted();
}
return;
@@ -768,14 +769,33 @@ void TargetARM32::genTargetHelperCallFor(Inst *Instr) {
auto *CmpInstr = llvm::cast<InstFcmp>(Instr);
const auto Condition = CmpInstr->getCondition();
scalarizeInstruction(
- Dest, CmpInstr->getSrc(0), CmpInstr->getSrc(1),
+ Dest,
[this, Condition](Variable *Dest, Variable *Src0, Variable *Src1) {
return Context.insert<InstFcmp>(Condition, Dest, Src0, Src1);
- });
+ },
+ CmpInstr->getSrc(0), CmpInstr->getSrc(1));
CmpInstr->setDeleted();
}
return;
}
+ case Inst::Select: {
+ Variable *Dest = Instr->getDest();
+ const auto DestTy = Dest->getType();
+ if (isVectorType(DestTy)) {
+ auto *SelectInstr = llvm::cast<InstSelect>(Instr);
+ scalarizeInstruction(Dest,
+ [this](Variable *Dest, Variable *Src0,
+ Variable *Src1, Variable *Src2) {
+ return Context.insert<InstSelect>(Dest, Src0, Src1,
+ Src2);
+ },
+ llvm::cast<Variable>(SelectInstr->getSrc(0)),
+ llvm::cast<Variable>(SelectInstr->getSrc(1)),
+ llvm::cast<Variable>(SelectInstr->getSrc(2)));
+ SelectInstr->setDeleted();
+ }
+ return;
+ }
}
}
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698