Skip to content

Commit abee030

Browse files
committed
[RISCV] Swap the order of SEWGreaterThanOrEqualAndLessThan64 and SEWGreaterThanOrEqual.
SEWGreaterThanOrEqualAndLessThan64 is a stricter constraint so it should have a higher value than SEWGreaterThanOrEqual. Found by our random test generator. I don't have a test case yet.
1 parent af5a656 commit abee030

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,12 @@ struct DemandedFields {
219219
// What properties of SEW we need to preserve.
220220
enum : uint8_t {
221221
SEWEqual = 3, // The exact value of SEW needs to be preserved.
222-
SEWGreaterThanOrEqual = 2, // SEW can be changed as long as it's greater
223-
// than or equal to the original value.
224222
SEWGreaterThanOrEqualAndLessThan64 =
225-
1, // SEW can be changed as long as it's greater
223+
2, // SEW can be changed as long as it's greater
226224
// than or equal to the original value, but must be less
227225
// than 64.
226+
SEWGreaterThanOrEqual = 1, // SEW can be changed as long as it's greater
227+
// than or equal to the original value.
228228
SEWNone = 0 // We don't need to preserve SEW at all.
229229
} SEW = SEWNone;
230230
enum : uint8_t {

0 commit comments

Comments
 (0)