These assert that there are no "useless" assertzext/assertsext nodes (that assert a wider width than a following trunc), but I don't think there is anything preventing such nodes from reaching this code. I don't think the assertion is relevant for correctness of this transform either -- if such an assert is present, then the other one will always be to a smaller width, and we'll pick that one. The assertion dates back to D37017.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM
llvm/test/CodeGen/X86/pr55846.ll | ||
---|---|---|
4 | Put a comment on this test, so we don't have to dig for its purpose? ; After legalization, this could be: "i8 truncate (i64 AssertZext X, Type: i9)" ; The AssertZext does not add information, so it should be eliminated, ; but that must not trigger a compile-time assert. |
Put a comment on this test, so we don't have to dig for its purpose?