Skip to content
Commit 0354463b authored by Max Kazantsev's avatar Max Kazantsev
Browse files

[SimpleLoopUnswtich] Support zext when injecting invariant conditions

This patch handles the following case: turn
```
if (x <u Invariant1) {
  if (zext(x) <u Invariant2) {
    ...
  }
}
```
into
```
if (x <u Invariant1) {
  if (zext(Invariant1) <=u Invariant2) { // Unswitch here
    // No check needed
  } else {
    if (zext(x) <u Invariant2) {
      ...
    }
  }
}
```

Differential Revision: https://reviews.llvm.org/D138015
Reviewed By: skatkov
parent 2fbf18b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment