Commit cb15e657 authored by Mikhail Gudim's avatar Mikhail Gudim
Browse files

[RISCV] A test for conditional binary ops.

Consider the following pattern:

```
%binop_ = binop %x, %y
%select_ = select %c, %binop_, %x
```

If there is an identity `%identity` operand for `binop`, it is possible to transform
the above code to:
```
%opearand = select %c, %y, %identity
%result = binop %x, %operand
```
This transformation is profitable when `%identity` is all zeroes or
ones.

This patch commits a test for such patterns.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D155481
parent a3da6284
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment