aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorIlya Andreev <ilya.andreev@syntacore.com>2022-09-13 09:01:56 -0400
committerSergey Kachkov <sergey.kachkov@syntacore.com>2022-12-23 17:10:21 +0300
commit7b9b81a245827261ce9d2adad0cd429589e8d5e7 (patch)
treedf158f34105c4eafa4ae61aa45aa9bdf2c85c7e0 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parenta09e222fd5f2e3a30d5bd5a53cae15487215c167 (diff)
downloadllvm-7b9b81a245827261ce9d2adad0cd429589e8d5e7.zip
llvm-7b9b81a245827261ce9d2adad0cd429589e8d5e7.tar.gz
llvm-7b9b81a245827261ce9d2adad0cd429589e8d5e7.tar.bz2
[RISCV][test] Combine comparison and logic ops
Two comparison operations and a logical operation are combined into selection using MIN or MAX and comparison operation. For optimization to be applied conditions have to be satisfied: 1. In comparison operations has to be the one common operand. 2. Supports only signed or unsigned integers. 3. Comparison has to be the same with respect to common operand. 4. There are no more users of comparison except logic operation. 5. Every combination of comparison and AND, OR are supported. It will convert %l0 = %a < %c %l1 = %b < %c %res = %l0 or %l1 into %sel = min(%a, %b) %res = %sel < %c It supports several comparison operations (<, <=, >, >=), signed, unsigned values and different order of operands if they do not violate conditions.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions