[all-commits] [llvm/llvm-project] 634877: [AMDGPU][LibCallSimplify] Use target type's float-...

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Thu Aug 6 07:22:20 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6348771d4f563fabd22338e772fd0cad394c80c5
      https://github.com/llvm/llvm-project/commit/6348771d4f563fabd22338e772fd0cad394c80c5
  Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
  Date:   2026-08-06 (Thu, 06 Aug 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPULibCalls.cpp
    M llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-pow.ll

  Log Message:
  -----------
  [AMDGPU][LibCallSimplify] Use target type's float-semantics in `ConstantFP::get` (#213721)

Compiler was crashing with:

```
Constants.cpp:1124: static llvm::ConstantFP* llvm::ConstantFP::get(llvm::Type*, const llvm::APFloat&):
    Assertion `Ty->getScalarType() == Type::getFloatingPointTy(Cont ext, V.getSemantics()) &&
    "ConstantFP type doesn't match the type implied by its value!"' failed.
```

Since the code was quite similar to `getConstantFloatVector`, I've ended
up modifying its implementation to also handle scalars and renamed it.



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