FCmp and ICmp now accept defined types

This commit is contained in:
Sasha Koshka 2024-01-28 00:18:37 -05:00
parent 9a4241cb11
commit f595a2e742
1 changed files with 2 additions and 2 deletions

View File

@ -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: