aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorxuli <xuli1@eswincomputing.com>2024-10-21 04:08:46 +0000
committerxuli <xuli1@eswincomputing.com>2024-10-22 01:13:59 +0000
commit4e65e12a9a34d76f9a43fbc7ae32875a909ac708 (patch)
tree28ab7ab1cd8b2fb7710ecf3f4d8a5e90ecbff802 /gcc/fortran
parent93b6f287814bca3d10bcf53bb64db40d77eff5d7 (diff)
downloadgcc-4e65e12a9a34d76f9a43fbc7ae32875a909ac708.zip
gcc-4e65e12a9a34d76f9a43fbc7ae32875a909ac708.tar.gz
gcc-4e65e12a9a34d76f9a43fbc7ae32875a909ac708.tar.bz2
Match: Support IMM=1 for unsigned scalar .SAT_SUB IMM form 1
This patch would like to support .SAT_SUB when one of the op is IMM = 1 of form1. Form 1: #define DEF_SAT_U_SUB_IMM_FMT_1(T, IMM) \ T __attribute__((noinline)) \ sat_u_sub_imm##IMM##_##T##_fmt_1 (T y) \ { \ return IMM >= y ? IMM - y : 0; \ } Take below form 1 as example: DEF_SAT_U_SUB_IMM_FMT_1(uint8_t, 1) Before this patch: __attribute__((noinline)) uint8_t sat_u_sub_imm1_uint8_t_fmt_1 (uint8_t y) { uint8_t _1; uint8_t _3; <bb 2> [local count: 1073741824]: if (y_2(D) <= 1) goto <bb 3>; [41.00%] else goto <bb 4>; [59.00%] <bb 3> [local count: 440234144]: _3 = y_2(D) ^ 1; <bb 4> [local count: 1073741824]: # _1 = PHI <0(2), _3(3)> return _1; } After this patch: __attribute__((noinline)) uint8_t sat_u_sub_imm1_uint8_t_fmt_1 (uint8_t y) { uint8_t _1; ;; basic block 2, loop depth 0 ;; pred: ENTRY _1 = .SAT_SUB (1, y_2(D)); [tail call] return _1; ;; succ: EXIT } The below test suites are passed for this patch: 1. The rv64gcv fully regression tests. 2. The x86 bootstrap tests. 3. The x86 fully regression tests. Signed-off-by: Li Xu <xuli1@eswincomputing.com> gcc/ChangeLog: * match.pd: Support IMM=1.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions