github.com/llir/llvm@v0.3.6/ir/block_unary.go (about)

     1  package ir
     2  
     3  import (
     4  	"github.com/llir/llvm/ir/value"
     5  )
     6  
     7  // --- [ Unary instructions ] --------------------------------------------------
     8  
     9  // ~~~ [ fneg ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    10  
    11  // NewFNeg appends a new fneg instruction to the basic block based on the given
    12  // operand.
    13  func (block *Block) NewFNeg(x value.Value) *InstFNeg {
    14  	inst := NewFNeg(x)
    15  	block.Insts = append(block.Insts, inst)
    16  	return inst
    17  }