This changes a rule in PPC64.rules to fix a failure in
test/issue45344.go when regabi is enabled.
Change-Id: I98baf2ae92c766b7276b0f3167b2e6fef37dfe84
Reviewed-on: https://go-review.googlesource.com/c/go/+/353789
Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Trust: Lynn Boger <laboger@linux.vnet.ibm.com>
(Store {t} ptr val mem) && t.Size() == 8 && is64BitFloat(val.Type) => (FMOVDstore ptr val mem)
(Store {t} ptr val mem) && t.Size() == 8 && is32BitFloat(val.Type) => (FMOVDstore ptr val mem) // glitch from (Cvt32Fto64F x) => x -- type is wrong
(Store {t} ptr val mem) && t.Size() == 4 && is32BitFloat(val.Type) => (FMOVSstore ptr val mem)
-(Store {t} ptr val mem) && t.Size() == 8 && (is64BitInt(val.Type) || isPtr(val.Type)) => (MOVDstore ptr val mem)
+(Store {t} ptr val mem) && t.Size() == 8 && !is64BitFloat(val.Type) => (MOVDstore ptr val mem)
(Store {t} ptr val mem) && t.Size() == 4 && is32BitInt(val.Type) => (MOVWstore ptr val mem)
(Store {t} ptr val mem) && t.Size() == 2 => (MOVHstore ptr val mem)
(Store {t} ptr val mem) && t.Size() == 1 => (MOVBstore ptr val mem)
return true
}
// match: (Store {t} ptr val mem)
- // cond: t.Size() == 8 && (is64BitInt(val.Type) || isPtr(val.Type))
+ // cond: t.Size() == 8 && !is64BitFloat(val.Type)
// result: (MOVDstore ptr val mem)
for {
t := auxToType(v.Aux)
ptr := v_0
val := v_1
mem := v_2
- if !(t.Size() == 8 && (is64BitInt(val.Type) || isPtr(val.Type))) {
+ if !(t.Size() == 8 && !is64BitFloat(val.Type)) {
break
}
v.reset(OpPPC64MOVDstore)