Unverified Commit f5811494 authored by Zain Jaffal's avatar Zain Jaffal Committed by GitHub
Browse files

check if operand is div in fold FDivSqrtDivisor (#81970)

This patch fixes the issues introduced in
https://github.com/llvm/llvm-project/commit/bb5c3899d1936ebdf7ebf5ca4347ee2e057bee7f

.

I moved the check for the instruction to be div before I check for the
fast math flags which resolves the crash in

```
float a, b;
double sqrt();
void c() { b = a / sqrt(a); }
```

---------

Co-authored-by: default avatarMatt Arsenault <arsenm2@gmail.com>
parent 57a2229a
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