llvm.org GIT mirror llvm / 594d5b1
[TableGen] - Type comparison LE should be LT or equal. Differential Revision: https://reviews.llvm.org/D61705 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361183 91177308-0d34-0410-b5e6-96231b3b80d8 Pete Couperus 2 months ago
1 changed file(s) with 3 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
506506 (A.getScalarSizeInBits() == B.getScalarSizeInBits() &&
507507 A.getSizeInBits() < B.getSizeInBits());
508508 };
509 auto LE = [](MVT A, MVT B) -> bool {
509 auto LE = [<](MVT A, MVT B) -> bool {
510510 // This function is used when removing elements: when a vector is compared
511511 // to a non-vector, it should return false (to avoid removal).
512512 if (A.isVector() != B.isVector())
513513 return false;
514514
515 // Note on the < comparison below:
516 // X86 has patterns like
517 // (set VR128X:$dst, (v16i8 (X86vtrunc (v4i32 VR128X:$src1)))),
518 // where the truncated vector is given a type v16i8, while the source
519 // vector has type v4i32. They both have the same size in bits.
520 // The minimal type in the result is obviously v16i8, and when we remove
521 // all types from the source that are smaller-or-equal than v8i16, the
522 // only source type would also be removed (since it's equal in size).
523 return A.getScalarSizeInBits() <= B.getScalarSizeInBits() ||
524 A.getSizeInBits() < B.getSizeInBits();
515 return LT(A, B) || (A.getScalarSizeInBits() == B.getScalarSizeInBits() &&
516 A.getSizeInBits() == B.getSizeInBits());
525517 };
526518
527519 for (unsigned M : Modes) {