When running the tests on PowerPC and x86, the lit test GlobalISel/trunc.ll fails at the memory sanitize step. This seems to be due to wrong invalid logic (which matches even if it shouldn't) and likely missing variable initialisation."
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp | ||
---|---|---|
74 | I don't see why you need to uglify this. Can't you just reset MatchInfo before the second matcher? |
llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp | ||
---|---|---|
74 | The problem is: in the current implementation, if both of the matches fail, there is a fallthrough. If there is no min or max following the trunc (see the test case), the match will continue. I want to make sure at least one case exists. That's why I am double-checking here. |
llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp | ||
---|---|---|
92–107 | Can you extract this into a separate function and call it in the passing cases instead? |
[AMDGPU] Re-adding the changes from D93708 and fixing the clamp selection pattern.
This patch intends to re-add the changes from D93708 which were removed in d49efdc9696afee4b972c54bc3678b28c5700047 and should fix the issue adressed in this update.
This should fix the sanitizer builds and prevent applying the clamp in unwanted cases.
I extracted the corresponding parts into a separate lambda and improved the logic to only apply the combine in the corresponding cases where either a min-max or max-min pattern exists in the MIR.
As @Flakebi reverted the changes to prevent the sanitizer from failing, I re-added the changes to this revision.
clang-tidy: warning: invalid case style for variable 'continueMatch' [readability-identifier-naming]
not useful