@@ -1964,11 +1964,25 @@ Instruction *InstCombinerImpl::visitFPToSI(FPToSIInst
&FI) {
}
Instruction *InstCombinerImpl::visitUIToFP(CastInst &CI) {
- return commonCastTransforms(CI);
+ if (Instruction *R = commonCastTransforms(CI))
+return R;
+ if (!CI.hasNonNeg() && isK
@@ -1964,11 +1964,25 @@ Instruction *InstCombinerImpl::visitFPToSI(FPToSIInst
&FI) {
}
Instruction *InstCombinerImpl::visitUIToFP(CastInst &CI) {
- return commonCastTransforms(CI);
+ if (Instruction *R = commonCastTransforms(CI))
+return R;
+ if (!CI.hasNonNeg() && isK
https://github.com/goldsteinn closed
https://github.com/llvm/llvm-project/pull/88299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
nikic wrote:
> > Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use
> > nneg instead of KnownBits after this change?
>
> yeah we could. Should I do a survey of existing folds first to ensure we
> don't incorrectly keep flags (like with `trunc nuw/nsw`) before integrati
https://github.com/dtcxzyw approved this pull request.
LGTM.
https://github.com/llvm/llvm-project/pull/88299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1964,11 +1964,25 @@ Instruction *InstCombinerImpl::visitFPToSI(FPToSIInst
&FI) {
}
Instruction *InstCombinerImpl::visitUIToFP(CastInst &CI) {
- return commonCastTransforms(CI);
+ if (Instruction *R = commonCastTransforms(CI))
+return R;
+ if (!CI.hasNonNeg() && isK
goldsteinn wrote:
> Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use
> nneg instead of KnownBits after this change?
yeah we could. Should I do a survey of existing folds first to ensure we don't
incorrectly keep flags (like with `trunc nuw/nsw`) before integrating to
nikic wrote:
Can the implementation of foldFBinOpOfIntCastsFromSign be simplified to use
nneg instead of KnownBits after this change?
https://github.com/llvm/llvm-project/pull/88299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists
https://github.com/nikic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/88299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (goldsteinn)
Changes
This is essentially the same as #82404 but has the `nneg` flag which
allows the backend to reliably undo the transform.
---
Patch is 61.71 KiB, truncated to 20.00 KiB below, full version:
https://github.com/llv
llvmbot wrote:
@llvm/pr-subscribers-llvm-transforms
Author: None (goldsteinn)
Changes
This is essentially the same as #82404 but has the `nneg` flag which
allows the backend to reliably undo the transform.
---
Patch is 61.71 KiB, truncated to 20.00 KiB below, full version:
https://gith
https://github.com/goldsteinn created
https://github.com/llvm/llvm-project/pull/88299
This is essentially the same as #82404 but has the `nneg` flag which
allows the backend to reliably undo the transform.
>From 46f76652548eed85a0947a93af701115875dbf6d Mon Sep 17 00:00:00 2001
From: Noah Golds
12 matches
Mail list logo