Issue |
147773
|
Summary |
[DAG] Fold trunc(avg(x,y)) for avgceil/floor u/s nodes if they have sufficient leading zero/sign bits
|
Labels |
good first issue,
llvm:SelectionDAG
|
Assignees |
|
Reporter |
RKSimon
|
Similar to #147683
If a ISD::AVG* node has sufficient leading zero/sign bits then it should still work in a truncated type.
- [ ] Create alive2 links to prove when all 4 avg patterns can be safely truncated
- [ ] Add test coverage (using aarch64 hadd intrinsics is probably easiest as that will always start from the correct nodes)
- [ ] Add suitable folds in DAGCombiner::visitTRUNCATE - including legality checks
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs