[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2025-01-09 Thread Kevin P. Neal via cfe-commits
kpneal wrote: D146845 wasn't committed because it would have caused test failures. The tests are wrong, the new checks reveal this, but the new checks cannot be committed until all broken tests are fixed. Otherwise we get failures from the bots and the Verifier checks would have been reverted.

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2025-01-08 Thread Kevin P. Neal via cfe-commits
kpneal wrote: I do think that before we start adding in code like this ticket we need to add IR Verifier code to check for proper use of the strictfp attribute. This code never made it into the tree because there are too many broken tests already in the tree. Verifier code could be written th

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2025-01-08 Thread Kevin P. Neal via cfe-commits
@@ -86,6 +86,43 @@ IRBuilderBase::createCallHelper(Function *Callee, ArrayRef Ops, return CI; } +CallInst *IRBuilderBase::CreateCall(FunctionType *FTy, Value *Callee, +ArrayRef Args, +ArrayRef OpBundles

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-16 Thread Serge Pavlov via cfe-commits
@@ -86,6 +86,43 @@ IRBuilderBase::createCallHelper(Function *Callee, ArrayRef Ops, return CI; } +CallInst *IRBuilderBase::CreateCall(FunctionType *FTy, Value *Callee, +ArrayRef Args, +ArrayRef OpBundles

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-13 Thread Kevin P. Neal via cfe-commits
@@ -86,6 +86,43 @@ IRBuilderBase::createCallHelper(Function *Callee, ArrayRef Ops, return CI; } +CallInst *IRBuilderBase::CreateCall(FunctionType *FTy, Value *Callee, +ArrayRef Args, +ArrayRef OpBundles

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-08 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Two, we can add a "readnone_fp_intrinsic" attribute, which would mean the > intrinsic is readnone unless there's an operand bundle indicating otherwise. I think this needs to be more refined to FP mode read/write and errno read/write. Basically a mirror of memory() for argument

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-06 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to > > update that if you want it to read/modify FP state. (Trying to override the > > default by sticking attributes on top doesn't work properly, as far as I > > know.) > This this the key point

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-06 Thread Matt Arsenault via cfe-commits
arsenm wrote: > If you mean an attribute of a call site, then yes, we need more detailed view > on side effects in non-default environment. Anyway, performance of a program > running with non-default rounding mode should not drop if exception tracking > is not needed. As for attribute of an in

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: > llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to > update that if you want it to read/modify FP state. (Trying to override the > default by sticking attributes on top doesn't work properly, as far as I > know.) I think we need a dedicated fp env attrib

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to update that if you want it to read/modify FP state. (Trying to override the default by sticking attributes on top doesn't work properly, as far as I know.) https://github.com/llvm/llvm-project/pull/

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Kevin P. Neal via cfe-commits
@@ -251,10 +251,12 @@ static bool markTails(Function &F, OptimizationRemarkEmitter *ORE) { // Special-case operand bundles "clang.arc.attachedcall", "ptrauth", and // "kcfi". kpneal wrote: This comment needs to be updated. I suggest removing the

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-01 Thread via cfe-commits
https://github.com/graphite-app[bot] edited https://github.com/llvm/llvm-project/pull/118253 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-01 Thread Serge Pavlov via cfe-commits
spavloff wrote: ### Merge activity * **Dec 2, 12:55 AM EST**: The merge label 'FP Bundles' was detected. This PR will be added to the [Graphite merge queue](https://app.graphite.dev/merges?org=llvm&repo=llvm-project) once it meets the requirements. https://github.com/llvm/llvm-project/pull/