Skip to content

Instantly share code, notes, and snippets.

@anarazel anarazel/x32.ll
Created Sep 21, 2018

Embed
What would you like to do?
; ModuleID = '<stdin>'
source_filename = "pg"
target datalayout = "e-m:e-p:32:32-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnux32"
%struct.ExprState = type { %struct.Node, i8, i8, i32, %struct.TupleTableSlot*, %struct.ExprEvalStep*, i32 (%struct.ExprState*, %struct.ExprContext*, i8*)*, %struct.Expr*, i8*, i32, i32, %struct.PlanState*, %struct.ParamListInfoData*, i32*, i8*, i32*, i8* }
%struct.Node = type { i32 }
%struct.TupleTableSlot = type { i32, i8, i8, i8, i8, %struct.HeapTupleData*, %struct.tupleDesc*, %struct.MemoryContextData*, i32, i32, i32*, i8*, %struct.MinimalTupleData*, %struct.HeapTupleData, i32, i8 }
%struct.tupleDesc = type { i32, i32, i32, i8, i32, %struct.tupleConstr*, [0 x %struct.FormData_pg_attribute] }
%struct.tupleConstr = type { %struct.attrDefault*, %struct.constrCheck*, %struct.attrMissing*, i16, i16, i8 }
%struct.attrDefault = type { i16, i8* }
%struct.constrCheck = type { i8*, i8*, i8, i8 }
%struct.attrMissing = type opaque
%struct.FormData_pg_attribute = type { i32, %struct.nameData, i32, i32, i16, i16, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32 }
%struct.nameData = type { [64 x i8] }
%struct.MemoryContextData = type { i32, i8, i8, %struct.MemoryContextMethods*, %struct.MemoryContextData*, %struct.MemoryContextData*, %struct.MemoryContextData*, %struct.MemoryContextData*, i8*, i8*, %struct.MemoryContextCallback* }
%struct.MemoryContextMethods = type { i8* (%struct.MemoryContextData*, i32)*, void (%struct.MemoryContextData*, i8*)*, i8* (%struct.MemoryContextData*, i8*, i32)*, void (%struct.MemoryContextData*)*, void (%struct.MemoryContextData*)*, i32 (%struct.MemoryContextData*, i8*)*, i1 (%struct.MemoryContextData*)*, void (%struct.MemoryContextData*, void (%struct.MemoryContextData*, i8*, i8*)*, i8*, %struct.MemoryContextCounters*)* }
%struct.MemoryContextCounters = type { i32, i32, i32, i32 }
%struct.MemoryContextCallback = type { void (i8*)*, i8*, %struct.MemoryContextCallback* }
%struct.MinimalTupleData = type { i32, [6 x i8], i16, i16, i8, [0 x i8] }
%struct.HeapTupleData = type { i32, %struct.ItemPointerData, i32, %struct.HeapTupleHeaderData* }
%struct.ItemPointerData = type { %struct.BlockIdData, i16 }
%struct.BlockIdData = type { i16, i16 }
%struct.HeapTupleHeaderData = type { %union.anon, %struct.ItemPointerData, i16, i16, i8, [0 x i8] }
%union.anon = type { %struct.HeapTupleFields }
%struct.HeapTupleFields = type { i32, i32, %union.anon.0 }
%union.anon.0 = type { i32 }
%struct.ExprEvalStep = type { i32, i32*, i8*, %union.anon.1 }
%union.anon.1 = type { %struct.anon.41 }
%struct.anon.41 = type { %struct.AggState*, %struct.AggStatePerTransData*, %struct.ExprContext*, i32, i32, i32, i32 }
%struct.AggState = type { %struct.ScanState, %struct.List*, i32, i32, i32, i32, %struct.AggStatePerPhaseData*, i32, i32, %struct.AggStatePerAggData*, %struct.AggStatePerTransData*, %struct.ExprContext*, %struct.ExprContext**, %struct.ExprContext*, %struct.ExprContext*, %struct.AggStatePerAggData*, %struct.AggStatePerTransData*, i8, i8, i32, i32, %struct.Bitmapset*, %struct.List*, i32, %struct.AggStatePerPhaseData*, %struct.Tuplesortstate*, %struct.Tuplesortstate*, %struct.TupleTableSlot*, %struct.AggStatePerGroupData**, %struct.HeapTupleData*, i8, i32, %struct.AggStatePerHashData*, %struct.AggStatePerGroupData**, %struct.AggStatePerGroupData**, %struct.ProjectionInfo* }
%struct.ScanState = type { %struct.PlanState, %struct.RelationData*, %struct.HeapScanDescData*, %struct.TupleTableSlot* }
%struct.PlanState = type { i32, %struct.Plan*, %struct.EState*, %struct.TupleTableSlot* (%struct.PlanState*)*, %struct.TupleTableSlot* (%struct.PlanState*)*, %struct.Instrumentation*, %struct.WorkerInstrumentation*, %struct.ExprState*, %struct.PlanState*, %struct.PlanState*, %struct.List*, %struct.List*, %struct.Bitmapset*, %struct.TupleTableSlot*, %struct.ExprContext*, %struct.ProjectionInfo*, %struct.tupleDesc* }
%struct.Plan = type { i32, double, double, double, i32, i8, i8, i32, %struct.List*, %struct.List*, %struct.Plan*, %struct.Plan*, %struct.List*, %struct.Bitmapset*, %struct.Bitmapset* }
%struct.EState = type { i32, i32, %struct.SnapshotData*, %struct.SnapshotData*, %struct.List*, %struct.PlannedStmt*, i8*, %struct.JunkFilter*, i32, %struct.ResultRelInfo*, i32, %struct.ResultRelInfo*, %struct.ResultRelInfo*, i32, %struct.List*, %struct.List*, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.ParamListInfoData*, %struct.ParamExecData*, %struct.QueryEnvironment*, %struct.MemoryContextData*, %struct.List*, %struct.List*, i64, i32, i32, i32, i8, %struct.List*, %struct.List*, %struct.List*, %struct.ExprContext*, %struct.HeapTupleData**, i8*, i8*, i8, %struct.dsa_area*, i32, %struct.JitContext* }
%struct.SnapshotData = type { i1 (%struct.HeapTupleData*, %struct.SnapshotData*, i32)*, i32, i32, i32*, i32, i32*, i32, i8, i8, i8, i32, i32, i32, i32, %struct.pairingheap_node, i64, i64 }
%struct.pairingheap_node = type { %struct.pairingheap_node*, %struct.pairingheap_node*, %struct.pairingheap_node* }
%struct.PlannedStmt = type { i32, i32, i64, i8, i8, i8, i8, i8, i8, i32, %struct.Plan*, %struct.List*, %struct.List*, %struct.List*, %struct.List*, %struct.List*, %struct.Bitmapset*, %struct.List*, %struct.List*, %struct.List*, %struct.List*, %struct.Node*, i32, i32 }
%struct.JunkFilter = type { i32, %struct.List*, %struct.tupleDesc*, i16*, %struct.TupleTableSlot*, i16 }
%struct.ResultRelInfo = type { i32, i32, %struct.RelationData*, i32, %struct.RelationData**, %struct.IndexInfo**, %struct.TriggerDesc*, %struct.FmgrInfo*, %struct.ExprState**, %struct.Instrumentation*, %struct.FdwRoutine*, i8*, i8, %struct.List*, %struct.List*, %struct.ExprState**, %struct.JunkFilter*, %struct.List*, %struct.ProjectionInfo*, %struct.List*, %struct.OnConflictSetState*, %struct.List*, %struct.ExprState*, %struct.RelationData*, i8 }
%struct.IndexInfo = type { i32, i32, i32, [32 x i16], %struct.List*, %struct.List*, %struct.List*, %struct.ExprState*, i32*, i32*, i16*, i32*, i32*, i16*, i8, i8, i8, i8, i32, i32, i8*, %struct.MemoryContextData* }
%struct.TriggerDesc = type { %struct.Trigger*, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
%struct.Trigger = type { i32, i8*, i32, i16, i8, i8, i32, i32, i32, i8, i8, i16, i16, i16*, i8**, i8*, i8*, i8* }
%struct.FmgrInfo = type { {}*, i32, i16, i8, i8, i8, i8*, %struct.MemoryContextData*, %struct.Node* }
%struct.FdwRoutine = type opaque
%struct.OnConflictSetState = type { i32, %struct.ProjectionInfo*, %struct.tupleDesc*, %struct.ExprState* }
%struct.ParamExecData = type { i8*, i32, i8 }
%struct.QueryEnvironment = type opaque
%struct.dsa_area = type opaque
%struct.JitContext = type opaque
%struct.Instrumentation = type { i8, i8, i8, %struct.timespec, %struct.timespec, double, double, %struct.BufferUsage, double, double, double, double, double, double, double, %struct.BufferUsage }
%struct.timespec = type { i64, i64 }
%struct.BufferUsage = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.timespec, %struct.timespec }
%struct.WorkerInstrumentation = type { i32, [0 x %struct.Instrumentation] }
%struct.RelationData = type opaque
%struct.HeapScanDescData = type opaque
%struct.AggStatePerAggData = type { %struct.Aggref*, i32, i32, %struct.FmgrInfo, i32, %struct.List*, i16, i8, i8 }
%struct.Aggref = type { %struct.Expr, i32, i32, i32, i32, i32, %struct.List*, %struct.List*, %struct.List*, %struct.List*, %struct.List*, %struct.Expr*, i8, i8, i8, i32, i32, i32 }
%struct.Expr = type { i32 }
%struct.Bitmapset = type { i32, [0 x i32] }
%struct.List = type { i32, i32, %struct.ListCell*, %struct.ListCell* }
%struct.ListCell = type { %union.anon.4, %struct.ListCell* }
%union.anon.4 = type { i8* }
%struct.AggStatePerPhaseData = type { i32, i32, i32*, %struct.Bitmapset**, %struct.ExprState**, %struct.Agg*, %struct.Sort*, %struct.ExprState* }
%struct.Agg = type { %struct.Plan, i32, i32, i32, i16*, i32*, i32, %struct.Bitmapset*, %struct.List*, %struct.List* }
%struct.Sort = type { %struct.Plan, i32, i16*, i32*, i32*, i8* }
%struct.Tuplesortstate = type opaque
%struct.AggStatePerHashData = type { %struct.TupleHashTableData*, %struct.tuplehash_iterator, %struct.TupleTableSlot*, %struct.FmgrInfo*, i32*, i32, i32, i32, i16*, i16*, %struct.Agg* }
%struct.TupleHashTableData = type { %struct.tuplehash_hash*, i32, i16*, %struct.FmgrInfo*, %struct.ExprState*, %struct.MemoryContextData*, %struct.MemoryContextData*, i32, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.FmgrInfo*, %struct.ExprState*, i32, %struct.ExprContext* }
%struct.tuplehash_hash = type { i64, i32, i32, i32, %struct.TupleHashEntryData*, %struct.MemoryContextData*, i8* }
%struct.TupleHashEntryData = type { %struct.MinimalTupleData*, i8*, i32, i32 }
%struct.tuplehash_iterator = type { i32, i32, i8 }
%struct.AggStatePerGroupData = type { i32, i8, i8 }
%struct.ProjectionInfo = type { i32, %struct.ExprState, %struct.ExprContext* }
%struct.AggStatePerTransData = type { %struct.Aggref*, i8, i32, i32, i32, i32, i32, i32, %struct.FmgrInfo, %struct.FmgrInfo, %struct.FmgrInfo, i32, i32, i32, i16*, i32*, i32*, i8*, %struct.FmgrInfo, %struct.ExprState*, i32, i8, i16, i16, i8, i8, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.tupleDesc*, %struct.Tuplesortstate**, %struct.FunctionCallInfoData, %struct.FunctionCallInfoData, %struct.FunctionCallInfoData }
%struct.FunctionCallInfoData = type { %struct.FmgrInfo*, %struct.Node*, %struct.Node*, i32, i8, i16, [100 x i32], [100 x i8] }
%struct.ParamListInfoData = type { %struct.ParamExternData* (%struct.ParamListInfoData*, i32, i1, %struct.ParamExternData*)*, i8*, void (%struct.ParamListInfoData*, %struct.Param*, %struct.ExprState*, i32*, i8*)*, i8*, void (%struct.ParseState*, i8*)*, i8*, i32, [0 x %struct.ParamExternData] }
%struct.ParamExternData = type { i32, i8, i16, i32 }
%struct.Param = type { %struct.Expr, i32, i32, i32, i32, i32, i32 }
%struct.ParseState = type opaque
%struct.ExprContext = type { i32, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.TupleTableSlot*, %struct.MemoryContextData*, %struct.MemoryContextData*, %struct.ParamExecData*, %struct.ParamListInfoData*, i32*, i8*, i32, i8, i32, i8, %struct.EState*, %struct.ExprContext_CB* }
%struct.ExprContext_CB = type { %struct.ExprContext_CB*, void (i32)*, i32 }
; Function Attrs: norecurse nounwind uwtable
define i32 @evalexpr_0_0(%struct.ExprState*, %struct.ExprContext*, i1*) #0 {
entry:
%v.state.resvalue = getelementptr inbounds %struct.ExprState, %struct.ExprState* %0, i32 0, i32 3
%v.state.resnull = getelementptr inbounds %struct.ExprState, %struct.ExprState* %0, i32 0, i32 2
%3 = getelementptr inbounds %struct.ExprContext, %struct.ExprContext* %1, i32 0, i32 1
%v_scanslot = load %struct.TupleTableSlot*, %struct.TupleTableSlot** %3
%4 = getelementptr inbounds %struct.ExprContext, %struct.ExprContext* %1, i32 0, i32 2
%v_innerslot = load %struct.TupleTableSlot*, %struct.TupleTableSlot** %4
%5 = getelementptr inbounds %struct.ExprContext, %struct.ExprContext* %1, i32 0, i32 3
%v_outerslot = load %struct.TupleTableSlot*, %struct.TupleTableSlot** %5
%6 = getelementptr inbounds %struct.ExprState, %struct.ExprState* %0, i32 0, i32 4
%v_resultslot = load %struct.TupleTableSlot*, %struct.TupleTableSlot** %6
%7 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_scanslot, i32 0, i32 10
%v_scanvalues = load i32*, i32** %7
%8 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_scanslot, i32 0, i32 11
%v_scannulls = load i8*, i8** %8
%9 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_innerslot, i32 0, i32 10
%v_innervalues = load i32*, i32** %9
%10 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_innerslot, i32 0, i32 11
%v_innernulls = load i8*, i8** %10
%11 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_outerslot, i32 0, i32 10
%v_outervalues = load i32*, i32** %11
%12 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_outerslot, i32 0, i32 11
%v_outernulls = load i8*, i8** %12
%13 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_resultslot, i32 0, i32 10
%v_resultvalues = load i32*, i32** %13
%14 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_resultslot, i32 0, i32 11
%v_resultnulls = load i8*, i8** %14
%15 = getelementptr inbounds %struct.ExprContext, %struct.ExprContext* %1, i32 0, i32 8
%v.econtext.aggvalues = load i32*, i32** %15
%16 = getelementptr inbounds %struct.ExprContext, %struct.ExprContext* %1, i32 0, i32 9
%v.econtext.aggnulls = load i8*, i8** %16
br label %b.op.0.start
b.op.0.start: ; preds = %entry
%17 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_innerslot, i32 0, i32 9
%18 = load i32, i32* %17
%19 = icmp uge i32 %18, 1
br i1 %19, label %b.op.1.start, label %op.0.fetch
op.0.fetch: ; preds = %b.op.0.start
call void @deform_0_1(%struct.TupleTableSlot* %v_innerslot)
br label %b.op.1.start
b.op.1.start: ; preds = %op.0.fetch, %b.op.0.start
%20 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %v_outerslot, i32 0, i32 9
%21 = load i32, i32* %20
%22 = icmp uge i32 %21, 1
br i1 %22, label %b.op.2.start, label %op.1.fetch
op.1.fetch: ; preds = %b.op.1.start
call void @deform_0_2(%struct.TupleTableSlot* %v_outerslot)
br label %b.op.2.start
b.op.2.start: ; preds = %op.1.fetch, %b.op.1.start
store i32 1473291560, i32* inttoptr (i32 1474065668 to i32*)
store i8 0, i8* inttoptr (i32 1474065665 to i8*)
br label %b.op.3.start
b.op.3.start: ; preds = %b.op.2.start
%23 = load i32, i32* %v.state.resvalue
%24 = load i8, i8* %v.state.resnull
%25 = getelementptr i32, i32* %v_resultvalues, i32 0
%26 = getelementptr i8, i8* %v_resultnulls, i32 0
store i8 %24, i8* %26
%27 = icmp eq i8 %24, 0
br i1 %27, label %op.3.assign_tmp.notnull, label %b.op.4.start
op.3.assign_tmp.notnull: ; preds = %b.op.3.start
%28 = call i32 @MakeExpandedObjectReadOnlyInternal(i32 %23)
store i32 %28, i32* %25
br label %b.op.4.start
b.op.4.start: ; preds = %op.3.assign_tmp.notnull, %b.op.3.start
%29 = getelementptr i32, i32* %v_outervalues, i32 0
%30 = load i32, i32* %29
%31 = getelementptr i8, i8* %v_outernulls, i32 0
%32 = load i8, i8* %31
%33 = getelementptr i32, i32* %v_resultvalues, i32 1
%34 = getelementptr i8, i8* %v_resultnulls, i32 1
store i32 %30, i32* %33
store i8 %32, i8* %34
br label %b.op.5.start
b.op.5.start: ; preds = %b.op.4.start
%35 = getelementptr i32, i32* %v_innervalues, i32 0
%36 = load i32, i32* %35
%37 = getelementptr i8, i8* %v_innernulls, i32 0
%38 = load i8, i8* %37
%39 = getelementptr i32, i32* %v_resultvalues, i32 2
%40 = getelementptr i8, i8* %v_resultnulls, i32 2
store i32 %36, i32* %39
store i8 %38, i8* %40
br label %b.op.6.start
b.op.6.start: ; preds = %b.op.5.start
%41 = load i32, i32* %v.state.resvalue
%42 = load i8, i8* %v.state.resnull
%43 = trunc i8 %42 to i1
store i1 %43, i1* %2
ret i32 %41
}
; Function Attrs: norecurse nounwind uwtable
define internal void @deform_0_1(%struct.TupleTableSlot* align 8) #0 {
entry:
%1 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 10
%tts_values = load i32*, i32** %1
%2 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 11
%tts_ISNULL = load i8*, i8** %2
%3 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 14
%4 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 4
%5 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 9
%6 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 5
%tupleheader = load %struct.HeapTupleData*, %struct.HeapTupleData** %6
%7 = getelementptr inbounds %struct.HeapTupleData, %struct.HeapTupleData* %tupleheader, i32 0, i32 3
%tuple = load %struct.HeapTupleHeaderData*, %struct.HeapTupleHeaderData** %7
%8 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 5
%t_bits = bitcast [0 x i8]* %8 to i8*
%9 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 3
%infomask1 = load i16, i16* %9
%10 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 2
%infomask2 = load i16, i16* %10
%11 = and i16 1, %infomask1
%hasnulls = icmp ne i16 %11, 0
%maxatt = and i16 2047, %infomask2
%12 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 4
%t_hoff = load i8, i8* %12
%13 = bitcast %struct.HeapTupleHeaderData* %tuple to i8*
%v_tupdata_base = getelementptr i8, i8* %13, i8 %t_hoff
%v_slot_off = load i32, i32* %3
%14 = icmp ult i16 %maxatt, 1
br i1 %14, label %adjust_unavail_cols, label %find_startblock
adjust_unavail_cols: ; preds = %entry
%15 = zext i16 %maxatt to i32
call void @slot_getmissingattrs(%struct.TupleTableSlot* %0, i32 %15, i32 1)
br label %find_startblock
find_startblock: ; preds = %adjust_unavail_cols, %entry
%16 = load i32, i32* %5
switch i32 %16, label %deadblock [
i32 0, label %block.attr.0.attcheckattno
]
outblock: ; preds = %block.attr.0.store, %block.attr.0.attisnull, %block.attr.0.attcheckattno
%v_offp.0 = phi i32 [ 0, %block.attr.0.attcheckattno ], [ 0, %block.attr.0.attisnull ], [ %increment_offset, %block.attr.0.store ]
store i32 1, i32* %5
store i32 %v_offp.0, i32* %3
store i8 1, i8* %4
ret void
deadblock: ; preds = %find_startblock
unreachable
block.attr.0.attcheckattno: ; preds = %find_startblock
%heap_natts = icmp uge i16 0, %maxatt
br i1 %heap_natts, label %outblock, label %block.attr.0.start
block.attr.0.start: ; preds = %block.attr.0.attcheckattno
%17 = getelementptr i8, i8* %t_bits, i32 0
%attnullbyte = load i8, i8* %17
%18 = and i8 %attnullbyte, 1
%attisnull = icmp eq i8 %18, 0
%19 = and i1 %hasnulls, %attisnull
br i1 %19, label %block.attr.0.attisnull, label %block.attr.0.attcheckalign
block.attr.0.attisnull: ; preds = %block.attr.0.start
%20 = getelementptr i8, i8* %tts_ISNULL, i16 0
store i8 1, i8* %20
%21 = getelementptr i32, i32* %tts_values, i16 0
store i32 0, i32* %21
br label %outblock
block.attr.0.attcheckalign: ; preds = %block.attr.0.start
br label %block.attr.0.align
block.attr.0.align: ; preds = %block.attr.0.attcheckalign
br label %block.attr.0.store
block.attr.0.store: ; preds = %block.attr.0.align
%22 = getelementptr i8, i8* %v_tupdata_base, i32 0
%23 = getelementptr i32, i32* %tts_values, i16 0
%24 = getelementptr i8, i8* %tts_ISNULL, i16 0
store i8 0, i8* %24
%attr_byval = load i8, i8* %22
%25 = zext i8 %attr_byval to i32
store i32 %25, i32* %23
%increment_offset = add i32 0, 1
br label %outblock
}
declare void @slot_getmissingattrs(%struct.TupleTableSlot*, i32, i32) #1
; Function Attrs: norecurse nounwind uwtable
define internal void @deform_0_2(%struct.TupleTableSlot* align 8) #0 {
entry:
%1 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 10
%tts_values = load i32*, i32** %1
%2 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 11
%tts_ISNULL = load i8*, i8** %2
%3 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 14
%4 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 4
%5 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 9
%6 = getelementptr inbounds %struct.TupleTableSlot, %struct.TupleTableSlot* %0, i32 0, i32 5
%tupleheader = load %struct.HeapTupleData*, %struct.HeapTupleData** %6
%7 = getelementptr inbounds %struct.HeapTupleData, %struct.HeapTupleData* %tupleheader, i32 0, i32 3
%tuple = load %struct.HeapTupleHeaderData*, %struct.HeapTupleHeaderData** %7
%8 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 5
%t_bits = bitcast [0 x i8]* %8 to i8*
%9 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 3
%infomask1 = load i16, i16* %9
%10 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 2
%infomask2 = load i16, i16* %10
%11 = and i16 1, %infomask1
%hasnulls = icmp ne i16 %11, 0
%maxatt = and i16 2047, %infomask2
%12 = getelementptr inbounds %struct.HeapTupleHeaderData, %struct.HeapTupleHeaderData* %tuple, i32 0, i32 4
%t_hoff = load i8, i8* %12
%13 = bitcast %struct.HeapTupleHeaderData* %tuple to i8*
%v_tupdata_base = getelementptr i8, i8* %13, i8 %t_hoff
%v_slot_off = load i32, i32* %3
%14 = icmp ult i16 %maxatt, 1
br i1 %14, label %adjust_unavail_cols, label %find_startblock
adjust_unavail_cols: ; preds = %entry
%15 = zext i16 %maxatt to i32
call void @slot_getmissingattrs(%struct.TupleTableSlot* %0, i32 %15, i32 1)
br label %find_startblock
find_startblock: ; preds = %adjust_unavail_cols, %entry
%16 = load i32, i32* %5
switch i32 %16, label %deadblock [
i32 0, label %block.attr.0.attcheckattno
]
outblock: ; preds = %block.attr.0.store, %block.attr.0.attisnull, %block.attr.0.attcheckattno
%v_offp.0 = phi i32 [ 0, %block.attr.0.attcheckattno ], [ 0, %block.attr.0.attisnull ], [ %increment_offset, %block.attr.0.store ]
store i32 1, i32* %5
store i32 %v_offp.0, i32* %3
store i8 1, i8* %4
ret void
deadblock: ; preds = %find_startblock
unreachable
block.attr.0.attcheckattno: ; preds = %find_startblock
%heap_natts = icmp uge i16 0, %maxatt
br i1 %heap_natts, label %outblock, label %block.attr.0.start
block.attr.0.start: ; preds = %block.attr.0.attcheckattno
%17 = getelementptr i8, i8* %t_bits, i32 0
%attnullbyte = load i8, i8* %17
%18 = and i8 %attnullbyte, 1
%attisnull = icmp eq i8 %18, 0
%19 = and i1 %hasnulls, %attisnull
br i1 %19, label %block.attr.0.attisnull, label %block.attr.0.attcheckalign
block.attr.0.attisnull: ; preds = %block.attr.0.start
%20 = getelementptr i8, i8* %tts_ISNULL, i16 0
store i8 1, i8* %20
%21 = getelementptr i32, i32* %tts_values, i16 0
store i32 0, i32* %21
br label %outblock
block.attr.0.attcheckalign: ; preds = %block.attr.0.start
br label %block.attr.0.align
block.attr.0.align: ; preds = %block.attr.0.attcheckalign
br label %block.attr.0.store
block.attr.0.store: ; preds = %block.attr.0.align
%22 = getelementptr i8, i8* %v_tupdata_base, i32 0
%23 = getelementptr i32, i32* %tts_values, i16 0
%24 = getelementptr i8, i8* %tts_ISNULL, i16 0
store i8 0, i8* %24
%attr_byval = load i8, i8* %22
%25 = zext i8 %attr_byval to i32
store i32 %25, i32* %23
%increment_offset = add i32 0, 1
br label %outblock
}
declare i32 @MakeExpandedObjectReadOnlyInternal(i32) #1
attributes #0 = { norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
@anarazel

This comment has been minimized.

Copy link
Owner Author

commented Sep 21, 2018

andres@alap4:~/src/llvm$ /home/andres/build/llvm/debug/install/bin/lli -mtriple=x86_64-pc-linux-gnux32 -O0 -entry-function=evalexpr_0_0 < /tmp/x32.ll
LLVM ERROR: Cannot select: t9: ch,glue = X86ISD::CALL t7, t12, Register:i32 $edi, RegisterMask:Untyped, t7:1
  t12: i32 = X86ISD::Wrapper TargetGlobalAddress:i32<void (%struct.TupleTableSlot*)* @deform_0_1> 0
    t11: i32 = TargetGlobalAddress<void (%struct.TupleTableSlot*)* @deform_0_1> 0
  t6: i32 = Register $edi
  t8: Untyped = RegisterMask
  t7: ch,glue = CopyToReg t5, Register:i32 $edi, t3
    t6: i32 = Register $edi
    t3: i32,ch = CopyFromReg t0, Register:i32 %27
      t2: i32 = Register %27
In function: evalexpr_0_0
andres@alap4:~/src/llvm$ /home/andres/build/llvm/debug/install/bin/llc -mtriple=x86_64-pc-linux-gnux32 -O0 < /tmp/x32.ll > /dev/null 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.