aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2021-02-21 15:26:54 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2021-02-21 15:26:54 +0000
commit38ab47c8136d4f928cfd4babb89cb3c7ab783437 (patch)
treedf07378abd2f3d9fc464c5f02aa7f8213a4d3821 /clang/lib/Frontend/CompilerInvocation.cpp
parenta6a258f1da37a678867bd29f7125417944bdecb2 (diff)
downloadllvm-38ab47c8136d4f928cfd4babb89cb3c7ab783437.zip
llvm-38ab47c8136d4f928cfd4babb89cb3c7ab783437.tar.gz
llvm-38ab47c8136d4f928cfd4babb89cb3c7ab783437.tar.bz2
[DAG] Match USUBSAT patterns through zext/trunc
This patch handles usubsat patterns hidden through zext/trunc and uses the getTruncatedUSUBSAT helper to determine if the USUBSAT can be correctly performed in the truncated form: zext(x) >= y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit))) zext(x) > y ? x - trunc(y) : 0 --> usubsat(x,trunc(umin(y,SatLimit))) Based on original examples: void foo(unsigned short *p, int max, int n) { int i; unsigned m; for (i = 0; i < n; i++) { m = *--p; *p = (unsigned short)(m >= max ? m-max : 0); } } Differential Revision: https://reviews.llvm.org/D25987
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions