arm.c (arm_option_override): Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.
ChangeLog: 2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com> * config/arm/arm.c (arm_option_override): Set max_insns_skipped to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2. testsuite/ChangeLog: 2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com> * gcc.target/arm/max-insns-skipped.c: New test. From-SVN: r213939
This commit is contained in:
parent
0b3a20e31d
commit
4d2df0f470
@ -1,3 +1,8 @@
|
||||
2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com>
|
||||
|
||||
* config/arm/arm.c (arm_option_override): Set max_insns_skipped
|
||||
to MAX_INSN_PER_IT_BLOCK when optimize_size for THUMB2.
|
||||
|
||||
2014-08-13 Chen Gang gang.chen.5i5j@gmail.com
|
||||
|
||||
* microblaze/microblaze.md: Remove redundant '@' to avoid compiling
|
||||
|
@ -2989,6 +2989,10 @@ arm_option_override (void)
|
||||
/* If optimizing for size, bump the number of instructions that we
|
||||
are prepared to conditionally execute (even on a StrongARM). */
|
||||
max_insns_skipped = 6;
|
||||
|
||||
/* For THUMB2, we limit the conditional sequence to one IT block. */
|
||||
if (TARGET_THUMB2)
|
||||
max_insns_skipped = MAX_INSN_PER_IT_BLOCK;
|
||||
}
|
||||
else
|
||||
max_insns_skipped = current_tune->max_insns_skipped;
|
||||
|
@ -1,3 +1,7 @@
|
||||
2014-08-14 Zhenqiang Chen <zhenqiang.chen@arm.com>
|
||||
|
||||
* gcc.target/arm/max-insns-skipped.c: New test.
|
||||
|
||||
2014-08-14 Bin Cheng <bin.cheng@arm.com>
|
||||
|
||||
* c-c++-common/addrtmp.c: Add bind_pic_locally option.
|
||||
|
21
gcc/testsuite/gcc.target/arm/max-insns-skipped.c
Normal file
21
gcc/testsuite/gcc.target/arm/max-insns-skipped.c
Normal file
@ -0,0 +1,21 @@
|
||||
/* { dg-do assemble { target arm_thumb2 } } */
|
||||
/* { dg-options " -Os " } */
|
||||
|
||||
int t (int a, int b, int c, int d)
|
||||
{
|
||||
int r;
|
||||
if (a > 0) {
|
||||
r = a + b;
|
||||
r += 0x456;
|
||||
r *= 0x1234567;
|
||||
}
|
||||
else {
|
||||
r = b - a;
|
||||
r -= 0x123;
|
||||
r *= 0x12387;
|
||||
r += d;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
/* { dg-final { object-size text <= 40 } } */
|
Loading…
Reference in New Issue
Block a user