[clang] [llvm] [InstCombine] Fold select(X >s 0, 0, -X) | smax(X, 0) to abs(X) (PR #165200)

Ulrich Weigand via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 28 02:10:08 PDT 2025


================
@@ -3584,13 +3584,13 @@ void test_integer(void) {
   // CHECK-ASM: vsrlb
 
   vsc = vec_abs(vsc);
-  // CHECK-ASM: vlcb
+  // CHECK-ASM: vlpb
----------------
uweigand wrote:

The SystemZ changes LGTM.  In fact, this fixes a regression I hadn't even been aware of, which was introduced here: https://github.com/llvm/llvm-project/commit/1a60ae02c65d26981017f59bc5918d3c2e363bfd

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


More information about the cfe-commits mailing list