aboutsummaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorPan Li <pan2.li@intel.com>2024-06-28 11:33:41 +0800
committerPan Li <pan2.li@intel.com>2024-06-29 18:37:32 +0800
commit21e3565927eda5ce9907d91100623052fa8182cd (patch)
treebd6d3a40fc045391d937f3c1c292e2165ed116c6 /libffi
parent45e74d5dfa4c5f372df0d3545bc342b6a2505e71 (diff)
downloadgcc-master.zip
gcc-master.tar.gz
gcc-master.tar.bz2
Match: Support imm form for unsigned scalar .SAT_ADDHEADtrunkmaster
This patch would like to support the form of unsigned scalar .SAT_ADD when one of the op is IMM. For example as below: Form IMM: #define DEF_SAT_U_ADD_IMM_FMT_1(T) \ T __attribute__((noinline)) \ sat_u_add_imm_##T##_fmt_1 (T x) \ { \ return (T)(x + 9) >= x ? (x + 9) : -1; \ } DEF_SAT_U_ADD_IMM_FMT_1(uint64_t) Before this patch: __attribute__((noinline)) uint64_t sat_u_add_imm_uint64_t_fmt_1 (uint64_t x) { long unsigned int _1; uint64_t _3; ;; basic block 2, loop depth 0 ;; pred: ENTRY _1 = MIN_EXPR <x_2(D), 18446744073709551606>; _3 = _1 + 9; return _3; ;; succ: EXIT } After this patch: __attribute__((noinline)) uint64_t sat_u_add_imm_uint64_t_fmt_1 (uint64_t x) { uint64_t _3; ;; basic block 2, loop depth 0 ;; pred: ENTRY _3 = .SAT_ADD (x_2(D), 9); [tail call] return _3; ;; succ: EXIT } The below test suites are passed for this patch: 1. The rv64gcv fully regression test with newlib. 2. The x86 bootstrap test. 3. The x86 fully regression test. gcc/ChangeLog: * match.pd: Add imm form for .SAT_ADD matching. * tree-ssa-math-opts.cc (math_opts_dom_walker::after_dom_children): Add .SAT_ADD matching under PLUS_EXPR. Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libffi')
0 files changed, 0 insertions, 0 deletions