Draft
Conversation
Collaborator
Author
|
Example Input: Command: pattern-gen core_descs/ExampleFP32.core_desc --no-extend --print-ir --mattr=+fLLVM-IR: ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite)
define void @implMAC(ptr nocapture readonly %rs2, ptr nocapture readonly %rs1, ptr noalias nocapture %rd) local_unnamed_addr #0 {
%rs1.v1 = load float, ptr %rs1, align 4
%rs2.v2 = load float, ptr %rs2, align 4
%rd.v3 = load float, ptr %rd, align 4
%1 = tail call float @llvm.fmuladd.f32(float %rd.v3, float %rs1.v1, float %rs2.v2)
store float %1, ptr %rd, align 4
ret void
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #1
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite)
define void @implMEAN(ptr nocapture readonly %rs2, ptr nocapture readonly %rs1, ptr noalias nocapture writeonly %rd) local_unnamed_addr #0 {
%rs1.v1 = load float, ptr %rs1, align 4
%rs2.v2 = load float, ptr %rs2, align 4
%1 = fadd float %rs1.v1, %rs2.v2
%2 = fmul float %1, 5.000000e-01
store float %2, ptr %rd, align 4
ret void
}Output: |
96ab03b to
7676873
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE.
This is untested and far away from complete. Just for reference.
TODOs:
G_FMAto fix MAC exampleEliminate unnecessary bitcasts in frontend