[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-06 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: Thanks Nicolai! https://github.com/llvm/llvm-project/pull/68714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-03 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: I meant ballot.i64 in wave64. For some reason, I didn't see the changes you made in those tests (perhaps I was looking at GitHub's display of your last changes to the PR, instead of the full PR.) But since you did make those changes, it's all good as far as I'm concerned. http

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-02 Thread Nicolai Hähnle via cfe-commits
nhaehnle wrote: Though, on second thought, shouldn't there be some wave64 tests? https://github.com/llvm/llvm-project/pull/68714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-11-02 Thread Nicolai Hähnle via cfe-commits
https://github.com/nhaehnle approved this pull request. https://github.com/llvm/llvm-project/pull/68714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-10-31 Thread Valery Pykhtin via cfe-commits
vpykhtin wrote: With the latest commit I added a guard to skip _ballot.i64_ in wave32 mode because it's lowered with _i64 AMDGPUISD::SETCC_ - this should be fixed with i32 result similar to ICMP/FCMP intrinsics. After a fix that follows this PR I'm going to turn the guard into assert - TODO is

[llvm] [clang] [clang-tools-extra] Improve selection of conditional branch on amdgcn.ballot!=0 condition in SelectionDAG. (PR #68714)

2023-10-31 Thread Valery Pykhtin via cfe-commits
@@ -396,3 +396,115 @@ true: false: ret i32 33 } + +declare i32 @llvm.amdgcn.icmp.i32(i1, i1, i32) + +define amdgpu_cs i32 @branch_divergent_simulated_negated_ballot_ne_zero_and(i32 %v1, i32 %v2) { +; CHECK-LABEL: branch_divergent_simulated_negated_ballot_ne_zero_and: +; CHEC