diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106818.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106818.patch | 105 |
1 files changed, 0 insertions, 105 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106818.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106818.patch deleted file mode 100644 index ef98142bc4..0000000000 --- a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/linaro/gcc-4.6-linaro-r106818.patch +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | 2011-10-03 Michael Hope <michael.hope@linaro.org> | ||
2 | |||
3 | Backport from mainline: | ||
4 | |||
5 | 2011-09-13 Sevak Sargsyan <sevak.sargsyan@ispras.ru> | ||
6 | |||
7 | gcc/ | ||
8 | * config/arm/neon.md (neon_vabd<mode>_2, neon_vabd<mode>_3): New | ||
9 | define_insn patterns for combine. | ||
10 | |||
11 | gcc/testsuite/ | ||
12 | * gcc.target/arm/neon-combine-sub-abs-into-vabd.c: New test. | ||
13 | |||
14 | === modified file 'gcc/config/arm/neon.md' | ||
15 | --- old/gcc/config/arm/neon.md 2011-09-28 15:14:59 +0000 | ||
16 | +++ new/gcc/config/arm/neon.md 2011-10-03 01:32:17 +0000 | ||
17 | @@ -5428,3 +5428,32 @@ | ||
18 | emit_insn (gen_neon_vec_pack_trunc_<V_double> (operands[0], tempreg)); | ||
19 | DONE; | ||
20 | }) | ||
21 | + | ||
22 | +(define_insn "neon_vabd<mode>_2" | ||
23 | + [(set (match_operand:VDQ 0 "s_register_operand" "=w") | ||
24 | + (abs:VDQ (minus:VDQ (match_operand:VDQ 1 "s_register_operand" "w") | ||
25 | + (match_operand:VDQ 2 "s_register_operand" "w"))))] | ||
26 | + "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)" | ||
27 | + "vabd.<V_s_elem> %<V_reg>0, %<V_reg>1, %<V_reg>2" | ||
28 | + [(set (attr "neon_type") | ||
29 | + (if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0)) | ||
30 | + (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | ||
31 | + (const_string "neon_fp_vadd_ddd_vabs_dd") | ||
32 | + (const_string "neon_fp_vadd_qqq_vabs_qq")) | ||
33 | + (const_string "neon_int_5")))] | ||
34 | +) | ||
35 | + | ||
36 | +(define_insn "neon_vabd<mode>_3" | ||
37 | + [(set (match_operand:VDQ 0 "s_register_operand" "=w") | ||
38 | + (abs:VDQ (unspec:VDQ [(match_operand:VDQ 1 "s_register_operand" "w") | ||
39 | + (match_operand:VDQ 2 "s_register_operand" "w")] | ||
40 | + UNSPEC_VSUB)))] | ||
41 | + "TARGET_NEON && (!<Is_float_mode> || flag_unsafe_math_optimizations)" | ||
42 | + "vabd.<V_if_elem> %<V_reg>0, %<V_reg>1, %<V_reg>2" | ||
43 | + [(set (attr "neon_type") | ||
44 | + (if_then_else (ne (symbol_ref "<Is_float_mode>") (const_int 0)) | ||
45 | + (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | ||
46 | + (const_string "neon_fp_vadd_ddd_vabs_dd") | ||
47 | + (const_string "neon_fp_vadd_qqq_vabs_qq")) | ||
48 | + (const_string "neon_int_5")))] | ||
49 | +) | ||
50 | |||
51 | === added file 'gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c' | ||
52 | --- old/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c 1970-01-01 00:00:00 +0000 | ||
53 | +++ new/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c 2011-10-03 01:32:17 +0000 | ||
54 | @@ -0,0 +1,50 @@ | ||
55 | +/* { dg-do compile } */ | ||
56 | +/* { dg-require-effective-target arm_neon_ok } */ | ||
57 | +/* { dg-options "-O2 -funsafe-math-optimizations" } */ | ||
58 | +/* { dg-add-options arm_neon } */ | ||
59 | + | ||
60 | +#include <arm_neon.h> | ||
61 | +float32x2_t f_sub_abs_to_vabd_32() | ||
62 | +{ | ||
63 | + float32x2_t val1 = vdup_n_f32 (10); | ||
64 | + float32x2_t val2 = vdup_n_f32 (30); | ||
65 | + float32x2_t sres = vsub_f32(val1, val2); | ||
66 | + float32x2_t res = vabs_f32 (sres); | ||
67 | + | ||
68 | + return res; | ||
69 | +} | ||
70 | +/* { dg-final { scan-assembler "vabd\.f32" } }*/ | ||
71 | + | ||
72 | +#include <arm_neon.h> | ||
73 | +int8x8_t sub_abs_to_vabd_8() | ||
74 | +{ | ||
75 | + int8x8_t val1 = vdup_n_s8 (10); | ||
76 | + int8x8_t val2 = vdup_n_s8 (30); | ||
77 | + int8x8_t sres = vsub_s8(val1, val2); | ||
78 | + int8x8_t res = vabs_s8 (sres); | ||
79 | + | ||
80 | + return res; | ||
81 | +} | ||
82 | +/* { dg-final { scan-assembler "vabd\.s8" } }*/ | ||
83 | + | ||
84 | +int16x4_t sub_abs_to_vabd_16() | ||
85 | +{ | ||
86 | + int16x4_t val1 = vdup_n_s16 (10); | ||
87 | + int16x4_t val2 = vdup_n_s16 (30); | ||
88 | + int16x4_t sres = vsub_s16(val1, val2); | ||
89 | + int16x4_t res = vabs_s16 (sres); | ||
90 | + | ||
91 | + return res; | ||
92 | +} | ||
93 | +/* { dg-final { scan-assembler "vabd\.s16" } }*/ | ||
94 | + | ||
95 | +int32x2_t sub_abs_to_vabd_32() | ||
96 | +{ | ||
97 | + int32x2_t val1 = vdup_n_s32 (10); | ||
98 | + int32x2_t val2 = vdup_n_s32 (30); | ||
99 | + int32x2_t sres = vsub_s32(val1, val2); | ||
100 | + int32x2_t res = vabs_s32 (sres); | ||
101 | + | ||
102 | + return res; | ||
103 | +} | ||
104 | +/* { dg-final { scan-assembler "vabd\.s32" } }*/ | ||
105 | |||