[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 08:21:16 PST 2023


================
@@ -0,0 +1,175 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
+; See PR-70845 for more details
+; RUN: opt < %s -S -passes=instcombine | FileCheck %s
+
+
+define signext i32 @sext_sext(i16 %x, i16 %y) {
----------------
nikic wrote:

Generally the tests in this file are not right for InstCombine. We should just directly check the min/max pattern with zext nneg there, nothing more. Preferably directly next to the existing tests for the transform (you can find them by commenting out the transform and seeing which tests break).

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


More information about the cfe-commits mailing list