diff options
author | QingShan Zhang <qshanz@cn.ibm.com> | 2019-06-26 05:12:53 +0000 |
---|---|---|
committer | QingShan Zhang <qshanz@cn.ibm.com> | 2019-06-26 05:12:53 +0000 |
commit | e0e7d4c3662e0263a05ba5207abec2faaf31ec76 (patch) | |
tree | 4c78a55e170a0f9917b1e6f34ad97f573d02890b /clang/lib/Tooling/JSONCompilationDatabase.cpp | |
parent | c3dfe9082bce468169c3ce94e55258d1bca7e692 (diff) | |
download | bcm5719-llvm-e0e7d4c3662e0263a05ba5207abec2faaf31ec76.tar.gz bcm5719-llvm-e0e7d4c3662e0263a05ba5207abec2faaf31ec76.zip |
Teach the DAGCombine to fold this pattern(c1 and c2 is constant).
// fold (sext (select cond, c1, c2)) -> (select cond, sext c1, sext c2)
// fold (zext (select cond, c1, c2)) -> (select cond, zext c1, zext c2)
// fold (aext (select cond, c1, c2)) -> (select cond, sext c1, sext c2)
Sign extend the operands if it is any_extend, to keep the signess of the operands that, the other combine rule would apply. The any_extend is handled as zero extend for constants. i.e.
t1: i8 = select t0, Constant:i8<-1>, Constant:i8<0>
t2: i64 = any_extend t1
-->
t3: i64 = select t0, Constant:i64<-1>, Constant:i64<0>
-->
t4: i64 = sign_extend_inreg t3
Differential Revision: https://reviews.llvm.org/D63318
llvm-svn: 364382
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
0 files changed, 0 insertions, 0 deletions