FCmp and ICmp now accept defined types
This commit is contained in:
parent
9a4241cb11
commit
f595a2e742
|
@ -608,7 +608,7 @@ func (this *Block) NewFCmp (predicate FPredicate, x, y Value) *InstructionFCmp {
|
|||
instruction.X = x
|
||||
instruction.Y = y
|
||||
instruction.Predicate = predicate
|
||||
switch xType := x.Type().(type) {
|
||||
switch xType := ReduceToBase(x.Type()).(type) {
|
||||
case *TypeFloat:
|
||||
instruction.Ty = &TypeInt { BitSize: 1 }
|
||||
case *TypeVector:
|
||||
|
@ -881,7 +881,7 @@ func (this *Block) NewICmp (predicate IPredicate, x, y Value) *InstructionICmp {
|
|||
instruction.X = x
|
||||
instruction.Y = y
|
||||
instruction.Predicate = predicate
|
||||
switch xType := x.Type().(type) {
|
||||
switch xType := ReduceToBase(x.Type()).(type) {
|
||||
case *TypeInt, *TypePointer:
|
||||
instruction.Ty = &TypeInt { BitSize: 1 }
|
||||
case *TypeVector:
|
||||
|
|
Loading…
Reference in New Issue