aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorliuhongt <hongtao.liu@intel.com>2023-12-19 10:39:06 +0800
committerliuhongt <hongtao.liu@intel.com>2024-01-11 09:20:17 +0800
commit6686e16fda419067b91614835dd743ebb82717ea (patch)
treefac882981a734386575829fe9bb93df289e8748d /gcc/c
parent96a9355a3d5b24f010fa6ad0b51bba5cc3f334f1 (diff)
downloadgcc-6686e16fda419067b91614835dd743ebb82717ea.zip
gcc-6686e16fda419067b91614835dd743ebb82717ea.tar.gz
gcc-6686e16fda419067b91614835dd743ebb82717ea.tar.bz2
Optimize A < B ? A : B to MIN_EXPR.
Similar for A < B ? B : A to MAX_EXPR. There're codes in the frontend to optimize such pattern but failed to handle testcase in the PR since it's exposed at gimple level when folding backend builtins. pr95906 now can be optimized to MAX_EXPR as it's commented in the testcase. // FIXME: this should further optimize to a MAX_EXPR typedef signed char v16i8 __attribute__((vector_size(16))); v16i8 f(v16i8 a, v16i8 b) gcc/ChangeLog: PR target/104401 * match.pd (VEC_COND_EXPR: A < B ? A : B -> MIN_EXPR): New patten match. gcc/testsuite/ChangeLog: * gcc.target/i386/pr104401.c: New test. * gcc.dg/tree-ssa/pr95906.c: Adjust testcase.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions