[all-commits] [llvm/llvm-project] 6180ce: [InstCombine] Remove nnan requirement for transfor...
Krishnakariya via All-commits
all-commits at lists.llvm.org
Tue Aug 3 05:23:28 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6180ce2e2abeb6f1f1b57852773ea07b8be290fa
https://github.com/llvm/llvm-project/commit/6180ce2e2abeb6f1f1b57852773ea07b8be290fa
Author: Krishna <krishna17060 at iiitd.ac.in>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
M llvm/test/Transforms/InstCombine/fabs.ll
Log Message:
-----------
[InstCombine] Remove nnan requirement for transformation to fabs from select
In this patch, the "nnan" requirement is removed for the canonicalization of select with fcmp to fabs.
(i) FSub logic: Remove check for nnan flag presence in fsub. Example: https://alive2.llvm.org/ce/z/751svg (fsub).
(ii) FNeg logic: Remove check for the presence of nnan and nsz flag in fneg. Example: https://alive2.llvm.org/ce/z/a_fsdp (fneg).
Differential Revision: https://reviews.llvm.org/D106872
Commit: d99260641b30b0638c6a1e60bcb971ec09fa5368
https://github.com/llvm/llvm-project/commit/d99260641b30b0638c6a1e60bcb971ec09fa5368
Author: Krishna <krishna17060 at iiitd.ac.in>
Date: 2021-08-03 (Tue, 03 Aug 2021)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineInternal.h
M llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp
M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
A llvm/test/Transforms/InstCombine/phi-int2ptr-fold.ll
Log Message:
-----------
[InstCombine] Fold phi ( inttoptr/ptrtoint x ) to phi (x)
The inttoptr/ptrtoint roundtrip optimization is not always correct.
We are working towards removing this optimization and adding support to specific cases where this optimization works.
In this patch, we focus on phi-node operands with inttoptr casts.
We know that ptrtoint( inttoptr( ptrtoint x) ) is same as ptrtoint (x).
So, we want to remove this roundtrip cast which goes through phi-node.
Reviewed By: aqjune
Differential Revision: https://reviews.llvm.org/D106289
Compare: https://github.com/llvm/llvm-project/compare/80c17bb29838...d99260641b30
More information about the All-commits
mailing list