[all-commits] [llvm/llvm-project] f022aa: Revert "[InstCombine] Optimise x / sqrt(y / z) wit...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Sat Feb 10 01:56:38 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f022aaf4e722eae9d0feaf7715a5d8960f4d017b
      https://github.com/llvm/llvm-project/commit/f022aaf4e722eae9d0feaf7715a5d8960f4d017b
  Author: Martin Storsjö <martin at martin.st>
  Date:   2024-02-10 (Sat, 10 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/fdiv-sqrt.ll

  Log Message:
  -----------
  Revert "[InstCombine] Optimise x / sqrt(y / z) with fast-math pattern. (#76737)"

This reverts commit bb5c3899d1936ebdf7ebf5ca4347ee2e057bee7f.

That commit caused failed asserts like this:

$ cat repro.c
float a, b;
double sqrt();
void c() { b = a / sqrt(a); }
$ clang -target x86_64-linux-gnu -c -O2 -ffast-math repro.c
clang: ../lib/IR/Instruction.cpp:522: bool llvm::Instruction::hasAllowReassoc() const: Assertion `isa<FPMathOperator>(this) && "getting fast-math flag on invalid op"' failed.




More information about the All-commits mailing list