Builder.getTrue/False assumes a scalar comparison, but this code supports vector compares.
I'm having trouble proving that this code isn't dead due to InstSimplify so I don't have a test case. But it looked obviously wrong.
Paths
| Differential D38384
[InstCombine] Don't use Builder.getTrue/False in foldICmpDivConstant Needs ReviewPublic Authored by craig.topper on Sep 28 2017, 3:15 PM.
Details
Summary Builder.getTrue/False assumes a scalar comparison, but this code supports vector compares. I'm having trouble proving that this code isn't dead due to InstSimplify so I don't have a test case. But it looked obviously wrong.
Diff Detail Event TimelineComment Actions This looks similar to a block of code we have for foldOrOfICmps(). We can fold some cases to constants (so InstSimplify should get those), but some cases just become different compares. Can we assert instead? In foldOrOfICmps(), it looks like: assert(!RHSC->isMaxValue(false) && "Missed icmp simplification");
Revision Contents
Diff 117064 lib/Transforms/InstCombine/InstCombineCompares.cpp
|