[llvm] [AMDGPU] Allow constant folding of bfloat (PR #215894)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 15:56:34 PDT 2026
rampitec wrote:
> > > ## Failed Tests
> > > (click on a test name to see its output)
> > > ### Clang
> > > Clang.CodeGen/builtins-nvptx.c
> > > If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
> >
> >
> > Oh there you go.
>
> Yeah. I do not have nvptx target configured and also didn't run clang tests locally. It also affects some of the nvptx clang builtins, meaning it was constant folded. I probably need to disable constant folding in that test somehow to preserve its meaning.
It seems I hit the wall with this test. ConstantFolding rightfully fold the call from the test, but it made the test useless. And CreateIntrinsic just unconditionally tries to fold the call. @Artem-B does this test really need to check trivial intrinsics on immediates or can use variables? This is `nvvm_abs_neg_bf16_bf16x2_sm80()` from the `clang/test/CodeGen/builtins-nvptx.c`. What it did now just folded a call to fabs().
https://github.com/llvm/llvm-project/pull/215894
More information about the llvm-commits
mailing list