leo-ard wrote:
@nikic ping:)
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 01/12] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCom
@@ -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) {
+; CHECK-LABEL: define s
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) {
ret i1 %c
}
+
+define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) {
+; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide(
+; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16
+; CHECK-NEXT:[[C:%.*]]
@@ -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) {
leo-ard
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 01/13] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCom
https://github.com/leo-ard edited
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) {
ret i1 %c
}
+
+define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) {
+; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide(
+; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16
+; CHECK-NEXT:[[C:%.*]]
@@ -0,0 +1,145 @@
+; RUN: opt < %s --O3 -S | FileCheck %s
leo-ard wrote:
How did you get the SSA form ? I wasn't able to do it on my side. Here are the
commands that I did :
```bash
> build_release/bin/clang -S -emit-llvm min_max.c -fno-discard-value-names -o
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 01/14] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCom
@@ -0,0 +1,112 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --version 3
+; RUN: opt < %s -O3 -S | FileCheck %s
+; See issue #55013 and PR #70845 for more details.
+; This test comes from the following C program, compiled with clang
+;
+;
https://github.com/leo-ard edited
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 01/15] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCom
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 01/16] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCom
@@ -0,0 +1,111 @@
+; RUN: opt < %s -O3 -S | FileCheck %s
+; See issue #55013 and PR #70845 for more details.
+; This test comes from the following C program, compiled with clang
+;
+;; short vecreduce_smin_v2i16(int n, short* v)
+;; {
+;; short p = 0;
+;; for (int i = 0; i < n
leo-ard wrote:
> Do you have the access to merge PR?
No I don't.
Thanks for the time and insightful comments !
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
https://github.com/leo-ard created
https://github.com/llvm/llvm-project/pull/70845
This PR fixes https://github.com/llvm/llvm-project/issues/55013 : the max
intrinsics is not generated for this simple loop case :
https://godbolt.org/z/hxz1xhMPh. This is caused by a ICMP not being folded into
https://github.com/leo-ard closed
https://github.com/llvm/llvm-project/pull/67594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
leo-ard wrote:
I'm closing this PR in favour of #70845
https://github.com/llvm/llvm-project/pull/67594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 6bb97fd48d59b7f79fdf90a2b27e9220f417fac7 Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 1/8] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCombi
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -O2 -triple=x86_64-apple-darwin -emit-llvm -o - |
FileCheck %s
leo-ard wrote:
Out of curiosity, why is end-to-end codegen with clang not used ? Is it too
unstable ?
https://github.com/llvm/llvm-project/pull/70845
___
@@ -0,0 +1,185 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
UTC_ARGS: --tool ./bin/opt --version 3
+; See PRXXX for more details
+; RUN-./bin/opt: opt < %s -S -passes=ipsccp | FileCheck %s
leo-ard wrote:
yep, a typo on my end
ht
leo-ard wrote:
Thanks for taking the time to review the PR. I just added another test in
PhaseOrdering to make sure that the min/max intrinsics are generated
https://github.com/llvm/llvm-project/pull/70845
___
cfe-commits mailing list
cfe-commits@list
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/70845
From 6bb97fd48d59b7f79fdf90a2b27e9220f417fac7 Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Mon, 30 Oct 2023 18:01:27 -0400
Subject: [PATCH 1/9] Add NonNeg check for InstCombine
---
llvm/lib/Transforms/InstCombi
https://github.com/leo-ard created
https://github.com/llvm/llvm-project/pull/67594
This PR fixes #55013 : the max intrinsics is not generated for this simple loop
case : https://godbolt.org/z/hxz1xhMPh. This is caused by a ICMP not being
folded into a select, thus not generating the max intrin
https://github.com/leo-ard updated
https://github.com/llvm/llvm-project/pull/67594
From 399f9d64cfde0761ac8278dd05ba704d879b1f5a Mon Sep 17 00:00:00 2001
From: leo-ard
Date: Wed, 27 Sep 2023 13:35:53 -0400
Subject: [PATCH 1/2] Adding ICMP folding for SCCPSolver
---
clang/test/CodeGen/X86/min_
leo-ard wrote:
> If I understood correctly, what you're trying to do here is to apply an icmp
> fold early before the sext -> zext information gets lost. I don't think this
> is the correct way to approach the problem. The correct way is to preserve
> the fact that the operand is non-negative
27 matches
Mail list logo