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

Side by Side Diff: src/IceTargetLowering.h

Issue 2412053002: [SubZero] Implement Fcmp, ICmp, Cast and Select for vector type (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase to master Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 assert(GeneratingTargetHelpers && 504 assert(GeneratingTargetHelpers &&
505 "scalarizeInstruction called during incorrect phase"); 505 "scalarizeInstruction called during incorrect phase");
506 const Type DestTy = Dest->getType(); 506 const Type DestTy = Dest->getType();
507 assert(isVectorType(DestTy)); 507 assert(isVectorType(DestTy));
508 const Type DestElementTy = typeElementType(DestTy); 508 const Type DestElementTy = typeElementType(DestTy);
509 const SizeT NumElements = typeNumElements(DestTy); 509 const SizeT NumElements = typeNumElements(DestTy);
510 510
511 Variable *T = Func->makeVariable(DestTy); 511 Variable *T = Func->makeVariable(DestTy);
512 if (auto *VarVecOn32 = llvm::dyn_cast<VariableVecOn32>(T)) { 512 if (auto *VarVecOn32 = llvm::dyn_cast<VariableVecOn32>(T)) {
513 VarVecOn32->initVecElement(Func); 513 VarVecOn32->initVecElement(Func);
514 auto *Undef = ConstantUndef::create(Ctx, DestTy);
515 Context.insert<InstAssign>(T, Undef);
516 } else {
517 Context.insert<InstFakeDef>(T);
514 } 518 }
515 Context.insert<InstFakeDef>(T);
516 519
517 for (SizeT I = 0; I < NumElements; ++I) { 520 for (SizeT I = 0; I < NumElements; ++I) {
518 auto *Index = Ctx->getConstantInt32(I); 521 auto *Index = Ctx->getConstantInt32(I);
519 522
520 auto makeExtractThunk = [this, Index, NumElements](Operand *Src) { 523 auto makeExtractThunk = [this, Index, NumElements](Operand *Src) {
521 return [this, Index, NumElements, Src]() { 524 return [this, Index, NumElements, Src]() {
522 assert(typeNumElements(Src->getType()) == NumElements); 525 assert(typeNumElements(Src->getType()) == NumElements);
523 526
524 const auto ElementTy = typeElementType(Src->getType()); 527 const auto ElementTy = typeElementType(Src->getType());
525 auto *Op = Func->makeVariable(ElementTy); 528 auto *Op = Func->makeVariable(ElementTy);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 virtual void lower() {} 645 virtual void lower() {}
643 646
644 protected: 647 protected:
645 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 648 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
646 GlobalContext *Ctx; 649 GlobalContext *Ctx;
647 }; 650 };
648 651
649 } // end of namespace Ice 652 } // end of namespace Ice
650 653
651 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 654 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698