[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 17 10:13:46 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:8427
+ SmallVector<uint32_t, 8> ShuffleMask;
+ ShuffleMask.clear();
+ for (unsigned i = 0; i < N; ++i)
----------------
This clear isn't needed.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:8432
+ CGF.Builder.CreateShuffleVector(AD, llvm::UndefValue::get(BTy),
+ ArrayRef<uint32_t>(ShuffleMask)),
+ VTy);
----------------
You shouldn't need to explicitly create an ArrayRef here. It should automatically convert. And if it doesn't makeArrayRef is what you should use. It will automatically infer the uint32_t from the vector.
Repository:
rC Clang
https://reviews.llvm.org/D45722
More information about the cfe-commits
mailing list