[PATCH] D45722: [X86] Lowering SAD (sum of absolute differences) intrinsics to native IR (clang side)
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 24 09:49:30 PDT 2018
craig.topper added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8425
+ llvm::Type *VTy = llvm::VectorType::get(QTy, N);
+ llvm::Type *BTy = llvm::VectorType::get(CGF.Builder.getInt8Ty(), N * 8);
+ SmallVector<uint32_t, 8> ShuffleMask;
----------------
Is this not a dead variable now?
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8426
+ llvm::Type *BTy = llvm::VectorType::get(CGF.Builder.getInt8Ty(), N * 8);
+ SmallVector<uint32_t, 8> ShuffleMask;
+ ShuffleMask.resize(N);
----------------
SmallVector<uint32_t, 8> ShuffleMask(N);
Then you don't need the resize call.
https://reviews.llvm.org/D45722
More information about the cfe-commits
mailing list