git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244460
91177308-0d34-0410-b5e6-
96231b3b80d8
void X86DAGToDAGISel::PreprocessISelDAG() {
// OptForSize is used in pattern predicates that isel is matching.
- // FIXME: Use Function::optForSize().
- OptForSize = MF->getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
+ OptForSize = MF->getFunction()->optForSize();
for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(),
E = CurDAG->allnodes_end(); I != E; ) {
; AVX can't do integer splats, so fake it: use vmovddup to splat 64-bit value.
; We also generate vmovddup for AVX2 because it's one byte smaller than vpbroadcastq.
-define <2 x i64> @splat_v2i64(<2 x i64> %x) #0 {
+define <2 x i64> @splat_v2i64(<2 x i64> %x) #1 {
%add = add <2 x i64> %x, <i64 1, i64 1>
ret <2 x i64> %add
; CHECK-LABEL: splat_v2i64