llvm.org GIT mirror llvm / abdf937
fix minsize detection: minsize attribute implies optimizing for size git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244460 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 4 years ago
2 changed file(s) with 2 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
461461
462462 void X86DAGToDAGISel::PreprocessISelDAG() {
463463 // OptForSize is used in pattern predicates that isel is matching.
464 // FIXME: Use Function::optForSize().
465 OptForSize = MF->getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
464 OptForSize = MF->getFunction()->optForSize();
466465
467466 for (SelectionDAG::allnodes_iterator I = CurDAG->allnodes_begin(),
468467 E = CurDAG->allnodes_end(); I != E; ) {
4242
4343 ; AVX can't do integer splats, so fake it: use vmovddup to splat 64-bit value.
4444 ; We also generate vmovddup for AVX2 because it's one byte smaller than vpbroadcastq.
45 define <2 x i64> @splat_v2i64(<2 x i64> %x) #0 {
45 define <2 x i64> @splat_v2i64(<2 x i64> %x) #1 {
4646 %add = add <2 x i64> %x,
4747 ret <2 x i64> %add
4848 ; CHECK-LABEL: splat_v2i64