[llvm] [InstCombine] foldVecExtTruncToExtElt - extend to handle trunc(lshr(extractelement(x,c1),c2)) -> extractelement(bitcast(x),c3) patterns. (PR #109689)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 28 00:21:25 PDT 2024


================
@@ -436,6 +436,67 @@ static Instruction *foldVecTruncToExtElt(TruncInst &Trunc,
   return ExtractElementInst::Create(VecInput, IC.Builder.getInt32(Elt));
 }
 
+// Whenever an element is extracted from a vector, and then truncated,
----------------
dtcxzyw wrote:

```suggestion
/// Whenever an element is extracted from a vector, and then truncated,
```
Should use `///` for func header comments.


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


More information about the llvm-commits mailing list