Skip to content

cmd/compile: lower float truncation to LLVM - #61

Merged
zhouguangyuan0718 merged 1 commit into
go1.27.masterfrom
codex/float-trunc-lowering
Aug 3, 2026
Merged

cmd/compile: lower float truncation to LLVM#61
zhouguangyuan0718 merged 1 commit into
go1.27.masterfrom
codex/float-trunc-lowering

Conversation

@zhouguangyuan0718

@zhouguangyuan0718 zhouguangyuan0718 commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • lower Go SSA OpTrunc with the semantics-matching llvm.trunc.f64 intrinsic
  • add SSA-checked LLVM IR coverage and runtime special-value/boundary checks
  • qualify fixedbugs/issue68322.go for GoObj compile, link, and execution on darwin/arm64
  • keep linux/amd64 GOAMD64=v1 fail-closed because its separate HasCPUFeature lowering remains unsupported; GOAMD64=v2 IR compilation succeeds

Validation

Revalidated after rebasing onto go1.27.master@5c34a612d8d5:

  • go test -tags=llvm23,dynamicllvm cmd/compile/internal/ssa
  • targeted Test/LLVM codegen for llvm_trunc.go
  • targeted Test/LLVM runtime for fixedbugs/issue68322.go and llvm_float_intrinsics.go
  • rebuilt Go toolchain and statepoint plugin against merged LLVM cmd/llvmplugin: describe pointer allocas as memory roots #33
  • gofmt and git diff --check

Earlier focused qualification also covered opt -passes=verify, llc -verify-machineinstrs, direct GoObj build/link/run, and native math.TestTrunc.

@zhouguangyuan0718
zhouguangyuan0718 force-pushed the codex/float-trunc-lowering branch from ba126cf to e49d5de Compare August 3, 2026 09:39
@zhouguangyuan0718
zhouguangyuan0718 merged commit 9b428f3 into go1.27.master Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant