wangpc-pp wrote:
> Can we implement this in `computeKnownBitsFromOperator/getRangeForIntrinsic`?
>
> https://github.com/llvm/llvm-project/blob/b21e3282864c9f7ad656c64bc375f5869ef76d19/llvm/lib/Analysis/ValueTracking.cpp#L1578-L1584
Thanks! We can implement this partly (will create another PR
dtcxzyw wrote:
Can we implement this in `computeKnownBitsFromOperator/getRangeForIntrinsic`?
https://github.com/llvm/llvm-project/blob/b21e3282864c9f7ad656c64bc375f5869ef76d19/llvm/lib/Analysis/ValueTracking.cpp#L1578-L1584
https://github.com/llvm/llvm-project/pull/79975
wangpc-pp wrote:
Ping for comments.
https://github.com/llvm/llvm-project/pull/79975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
wangpc-pp wrote:
> Also I guess most of RVV intrinsic could add `const` too, that could help
> some generic optimization work better like CSE.
This PR doesn't add the `const` attribute, I don't know if adding `const` may
help to optimize.
https://github.com/llvm/llvm-project/pull/79975
kito-cheng wrote:
Also I guess most of RVV intrinsic could add `const` too, that could help some
generic optimization work better like CSE.
https://github.com/llvm/llvm-project/pull/79975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
kito-cheng wrote:
I guess we need add that at RVVEmitter::createbuilt...@riscvvemitter.cpp?
[1]
https://github.com/llvm/llvm-project/blob/main/clang/utils/TableGen/RISCVVEmitter.cpp#L418
[2]
https://github.com/llvm/llvm-project/blob/main/clang/include/clang/Basic/Builtins.h#L122-L124
[3]
wangpc-pp wrote:
> I'm concerned that llvm.assume is handled differently than a branch to
> unreachable in the middle end.
Actually the CodeGen part is written by referring to the LLVM IR generated by
unreachable way (https://godbolt.org/z/vf1v7f744).
> Have you tested that these assumes
topperc wrote:
I'm concerned that llvm.assume is handled differently than a branch to
unreachable in the middle end. Have you tested that these assumes have the
intended effect?
https://github.com/llvm/llvm-project/pull/79975
___
cfe-commits mailing
wangpc-pp wrote:
After some random thinking, I think these assumptions may need to be added to
vsetvli/vsetvlimax LLVM intrinsics instead of adding them in Clang CodeGen. In
this way, we can make other frontends like `flang/Rust/TVM/MLIR/...` benefit
from these assumptions. Is it possible? I
hiraditya wrote:
cc: @alexey-bataev @nikolaypanchenko
https://github.com/llvm/llvm-project/pull/79975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kito-cheng wrote:
Does it possible to add testcases to demonstrate that can improve optimization?
https://github.com/llvm/llvm-project/pull/79975
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
llvmbot wrote:
@llvm/pr-subscribers-backend-risc-v
@llvm/pr-subscribers-clang
Author: Wang Pengcheng (wangpc-pp)
Changes
There are some assumptions of the return value of vsetvli/vsetvlimax,
we add them via `llvm.assume` so that middle-end optimizations can
benefit from them.
---
Patch
12 matches
Mail list logo