[llvm] [DAG] select (sext m), (add X, C), X --> (add X, (and C, (sext m)))) (PR #83640)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 3 03:21:14 PST 2024


================
@@ -4,6 +4,35 @@
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx | FileCheck %s --check-prefixes=AVX,AVX1
 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx2 | FileCheck %s --check-prefixes=AVX,AVX2
 
+; should Fold select (sext m), (add X, C), X --> (add X, (and C, (sext m))))
----------------
RKSimon wrote:

Include the reference to #66101 for people looking at this in the future:
`; PR66101 - Fold select (sext m), (add X, C), X --> (add X, (and C, (sext m))))`

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


More information about the llvm-commits mailing list