[PATCH] D48462: [X86] Update handling in CGBuiltin to be tolerant of out of range immediates.
Craig Topper via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 21 16:06:03 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/CodeGen/CGBuiltin.cpp:9322
unsigned Index = BuiltinID == X86::BI__builtin_ia32_storelps ? 0 : 1;
- llvm::Value *Idx = llvm::ConstantInt::get(SizeTy, Index);
- Ops[1] = Builder.CreateExtractElement(Ops[1], Idx, "extract");
+ Ops[1] = Builder.CreateExtractElement(Ops[1], Index, "extract");
----------------
This was just a place I notice where we could avoid explicitly creating the constant ourselves and rely on the other signature of CreateExtractElement.
https://reviews.llvm.org/D48462
More information about the cfe-commits
mailing list