[all-commits] [llvm/llvm-project] f58114: check if operand is div in fold FDivSqrtDivisor (#...
Zain Jaffal via All-commits
all-commits at lists.llvm.org
Sat Mar 9 09:15:37 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f5811494b0cde306e98caa339e4dc1c06cb5e8e9
https://github.com/llvm/llvm-project/commit/f5811494b0cde306e98caa339e4dc1c06cb5e8e9
Author: Zain Jaffal <zain at jjaffal.com>
Date: 2024-03-09 (Sat, 09 Mar 2024)
Changed paths:
M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
M llvm/test/Transforms/InstCombine/fdiv-sqrt.ll
Log Message:
-----------
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: Matt Arsenault <arsenm2 at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list