aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-08-05 08:22:29 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-08-05 08:22:29 +0000
commit870bf1788ca95986dacf4a1b56bbc2cf7127c230 (patch)
tree8718955a31f170b1a2bcb487251e72db633be5bf /clang/lib/Frontend/FrontendAction.cpp
parent470608e3e48af598513f36107e36a555a1966e75 (diff)
downloadllvm-870bf1788ca95986dacf4a1b56bbc2cf7127c230.zip
llvm-870bf1788ca95986dacf4a1b56bbc2cf7127c230.tar.gz
llvm-870bf1788ca95986dacf4a1b56bbc2cf7127c230.tar.bz2
[InstCombine] try to fold (select C, (sext A), B) into logical ops
Summary: Turn (select C, (sext A), B) into (sext (select C, A, B')) when A is i1 and B is a compatible constant, also for zext instead of sext. This will then be further folded into logical operations. The transformation would be valid for non-i1 types as well, but other parts of InstCombine prefer to have sext from non-i1 as an operand of select. Motivated by the shader compiler frontend in Mesa for AMDGPU, which emits i32 for boolean operations. With this change, the boolean logic is fully recovered. Reviewers: majnemer, spatel, tstellarAMD Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22747 llvm-svn: 277801
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
0 files changed, 0 insertions, 0 deletions