[llvm] [NVPTX] Fix the error in a pattern match in v4i8 comparisons. (PR #81308)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 11:54:25 PST 2024
================
@@ -2259,27 +2261,69 @@ def : Pat<(setueq Int1Regs:$a, Int1Regs:$b),
(NOT1 (XORb1rr Int1Regs:$a, Int1Regs:$b))>;
// comparisons of i8 extracted with BFE as i32
-def: Pat<(setgt (sext_inreg (trunc Int32Regs:$a), i8), (sext_inreg (trunc Int32Regs:$b), i8)),
- (SETP_s32rr Int32Regs:$a, Int32Regs:$b, CmpGT)>;
----------------
Artem-B wrote:
This was the root cause of the problem. We should've used `bfe($a/$b, 8, 8)`.
The tests worked because $a/$h happened to be the result of `bfe()` we've lowered for `extractement()`, so PTX output looked sane.
https://github.com/llvm/llvm-project/pull/81308
More information about the llvm-commits
mailing list