[PATCH] D65497: [RISCV] Avoid generating AssertZext for RV64 when lowering floating Libcall
Shiva Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 01:17:26 PDT 2019
shiva0217 updated this revision to Diff 212746.
shiva0217 retitled this revision from "[RISCV] Generate extensions for RV64 when lowering LibCall with i32 type" to "[RISCV] Avoid generating AssertZext for RV64 when lowering floating Libcall".
shiva0217 edited the summary of this revision.
shiva0217 added a comment.
Hi @eli.friedman,
Thanks for pointing me the right direction.
I added `shouldExtendTypeInLibCall` target hook to indicate the Libcall should do the extension or not.
The parameter IsCastFromFloat will be passed to TargetLowering::makeLibCall and shouldExtendTypeInLibCall. So shouldExtendTypeInLibCall can identify the Type is casting by floating and disable the extensions.
Without generating AssertZext for the Libcall return value, `and` operation for clearing upper bits will be preserved.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65497/new/
https://reviews.llvm.org/D65497
Files:
include/llvm/CodeGen/TargetLowering.h
lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/RISCV/RISCVISelLowering.cpp
lib/Target/RISCV/RISCVISelLowering.h
test/CodeGen/RISCV/rv32i-rv64i-float-double.ll
test/CodeGen/RISCV/rv64-complex-float.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65497.212746.patch
Type: text/x-patch
Size: 17119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190801/4bbb1808/attachment.bin>
More information about the llvm-commits
mailing list