Adds the following combines, plus AArch64 tests:
- (fptrunc (fpext x)) -> x, when dest and source types match.
- (fptrunc ([us]itofp x)) -> ([us]itofp x)
- (fpext C) -> C
- (fpext ([us]itofp x)) -> ([us]itofp x), when x is 8 bit.
Paths
| Differential D105525
[GISel] Add fpext/fptrunc combines Needs RevisionPublic Authored by pnappa on Jul 6 2021, 8:23 PM.
Details
Summary Adds the following combines, plus AArch64 tests:
Diff Detail Event TimelineComment Actions Fixed AMDGPU's fdiv.f16.ll test. ninja check-llvm-codegen Successfully passes locally.
Comment Actions Addressed @foad 's concerns about fast-math. Removed the combine applying when unsafe math is enabled. Comment Actions
Thanks. Please remove it from the commit message too.
pnappa added inline comments.
This revision now requires changes to proceed.Aug 17 2023, 4:03 PM
Revision Contents
Diff 368552 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/combine-ext.mir
llvm/test/CodeGen/AArch64/GlobalISel/combine-fpext-suitofp.mir
llvm/test/CodeGen/AArch64/GlobalISel/combine-fptrunc.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/fdiv.f16.ll
|
The apply functions should return void.