mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
fix minsize detection: minsize attribute implies optimizing for size
llvm-svn: 244604
This commit is contained in:
parent
870596a89a
commit
e13d1d30df
@ -426,9 +426,7 @@ bool MachineCombiner::runOnMachineFunction(MachineFunction &MF) {
|
||||
MRI = &MF.getRegInfo();
|
||||
Traces = &getAnalysis<MachineTraceMetrics>();
|
||||
MinInstr = 0;
|
||||
|
||||
// FIXME: Use Function::optForSize().
|
||||
OptSize = MF.getFunction()->hasFnAttribute(Attribute::OptimizeForSize);
|
||||
OptSize = MF.getFunction()->optForSize();
|
||||
|
||||
DEBUG(dbgs() << getPassName() << ": " << MF.getName() << '\n');
|
||||
if (!TII->useMachineCombiner()) {
|
||||
|
@ -37,10 +37,11 @@ define i128 @test_128bitmul_optsize(i128 %lhs, i128 %rhs) optsize {
|
||||
|
||||
define i128 @test_128bitmul_minsize(i128 %lhs, i128 %rhs) minsize {
|
||||
; CHECK-LABEL: test_128bitmul_minsize:
|
||||
; CHECK-DAG: mul [[PART1:x[0-9]+]], x0, x3
|
||||
; CHECK-DAG: umulh [[CARRY:x[0-9]+]], x0, x2
|
||||
; CHECK: mul [[PART2:x[0-9]+]], x1, x2
|
||||
; CHECK: mul x0, x0, x2
|
||||
; CHECK: umulh [[HI:x[0-9]+]], x0, x2
|
||||
; CHECK-NEXT: madd [[TEMP1:x[0-9]+]], x0, x3, [[HI]]
|
||||
; CHECK-NEXT: madd x1, x1, x2, [[TEMP1]]
|
||||
; CHECK-NEXT: mul x0, x0, x2
|
||||
; CHECK-NEXT: ret
|
||||
|
||||
%prod = mul i128 %lhs, %rhs
|
||||
ret i128 %prod
|
||||
|
Loading…
x
Reference in New Issue
Block a user