diff options
author | Jakub Jelinek <jakub@redhat.com> | 2013-07-08 10:48:40 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-07-08 10:48:40 +0200 |
commit | 8140c06592fe11cfb82c54f0dc467705381a8785 (patch) | |
tree | 38579d40ff3a272b2669af830c79e5de77e39b55 /gcc/combine.c | |
parent | 78d432da45406aaeb97b7485f548d07fc3ca7049 (diff) | |
download | gcc-8140c06592fe11cfb82c54f0dc467705381a8785.zip gcc-8140c06592fe11cfb82c54f0dc467705381a8785.tar.gz gcc-8140c06592fe11cfb82c54f0dc467705381a8785.tar.bz2 |
re PR target/57819 (Suboptimal shift patterns)
PR target/57819
* simplify-rtx.c (simplify_unary_operation_1) <case ZERO_EXTEND>:
Simplify (zero_extend:SI (subreg:QI (and:SI (reg:SI)
(const_int 63)) 0)).
* combine.c (make_extraction): Create ZERO_EXTEND or SIGN_EXTEND
using simplify_gen_unary instead of gen_rtx_*_EXTEND.
* config/i386/i386.md (*jcc_bt<mode>_1): New define_insn_and_split.
* gcc.target/i386/pr57819.c: New test.
From-SVN: r200775
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index b737bc5..ca311ff 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7326,7 +7326,8 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, if (pos_rtx != 0 && GET_MODE_SIZE (pos_mode) > GET_MODE_SIZE (GET_MODE (pos_rtx))) { - rtx temp = gen_rtx_ZERO_EXTEND (pos_mode, pos_rtx); + rtx temp = simplify_gen_unary (ZERO_EXTEND, pos_mode, pos_rtx, + GET_MODE (pos_rtx)); /* If we know that no extraneous bits are set, and that the high bit is not set, convert extraction to cheaper one - either @@ -7340,7 +7341,8 @@ make_extraction (enum machine_mode mode, rtx inner, HOST_WIDE_INT pos, >> 1)) == 0))) { - rtx temp1 = gen_rtx_SIGN_EXTEND (pos_mode, pos_rtx); + rtx temp1 = simplify_gen_unary (SIGN_EXTEND, pos_mode, pos_rtx, + GET_MODE (pos_rtx)); /* Prefer ZERO_EXTENSION, since it gives more information to backends. */ |