diff options
| author | Serge Pavlov <sepavloff@gmail.com> | 2023-06-06 14:54:52 +0700 |
|---|---|---|
| committer | Serge Pavlov <sepavloff@gmail.com> | 2023-06-06 14:54:52 +0700 |
| commit | 10e7899818803029d2f91a20c67f5a1d75781b8a (patch) | |
| tree | 7e6b1467e43b1051ca12513e6cd366c5ad54aa25 /mlir/lib/Bytecode/Reader/BytecodeReader.cpp | |
| parent | 976d25ed9e575b7326a406c525bb1957f801d393 (diff) | |
| download | llvm-10e7899818803029d2f91a20c67f5a1d75781b8a.zip llvm-10e7899818803029d2f91a20c67f5a1d75781b8a.tar.gz llvm-10e7899818803029d2f91a20c67f5a1d75781b8a.tar.bz2 | |
[FPEnv] Get rid of extra moves in fpenv calls
If intrinsic `get_fpenv` or `set_fpenv` is lowered to the form where FP
environment is represented as a region in memory, extra moves can
appear. For example the code:
define void @func_01(ptr %ptr) {
%env = call i256 @llvm.get.fpenv.i256()
store i256 %env, ptr %ptr
ret void
}
produces DAG:
ch = get_fpenv_mem ch, memory_region
val: i256, ch = load ch, memory_region
ch = store ch, ptr, val
In this case the extra moves can be avoided if `get_fpenv_mem` got
pointer to the memory where the FP environment should be finally placed.
This change implement such optimization for this use case.
Differential Revision: https://reviews.llvm.org/D150437
Diffstat (limited to 'mlir/lib/Bytecode/Reader/BytecodeReader.cpp')
0 files changed, 0 insertions, 0 deletions
