[llvm] [llvm] Add KnownBits implementations for avgFloor and avgCeil (PR #86445)

Nhat Nguyen via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 20 21:49:32 PDT 2024


changkhothuychung wrote:

> @changkhothuychung If you change the KnownBits implementation back to the same as the original SelectionDAG (add/sub of ext) do the problems go away?

Hi, no it would not. However, I just found there might be a potential bug related to the previous PR https://github.com/llvm/llvm-project/pull/86754. 

In the file [AArch64SelectionDAGTest.cpp](https://github.com/llvm/llvm-project/pull/86754/files#diff-4977843fe788410d80ba3e9bf106458157803452f0fc91d2a88cb5df170daa9f), at line 828, it's 

```cpp 

SDValue AVGFLOORS =
      DAG->getNode(ISD::AVGFLOORU, Loc, Int16Vec8VT, ZextOp0, ZextOp1);
      
 ```
 
 I think ISD::AVGFLOORS should be passed as the first argument instead. But the tests still passed. 

https://github.com/llvm/llvm-project/pull/86445


More information about the llvm-commits mailing list