diff --git a/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td b/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td index bdcb1a2457a5..7ace4e9f2be6 100644 --- a/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td +++ b/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td @@ -713,3 +713,12 @@ def : Pat<(V8lo tconstpool:$in), (ORri G0, tconstpool:$in)>; // Return of a value, which has an input flag. def : Pat<(retflag ICC/*HACK*/), (RETL)>; + +// Map integer extload's to zextloads. +// Handling 1 bit extload +def : Pat<(i32 (extload ADDRrr:$src, i1)), (LDUBrr ADDRrr:$src)>; +def : Pat<(i32 (extload ADDRri:$src, i1)), (LDUBri ADDRri:$src)>; +def : Pat<(i32 (extload ADDRrr:$src, i8)), (LDUBrr ADDRrr:$src)>; +def : Pat<(i32 (extload ADDRri:$src, i8)), (LDUBri ADDRri:$src)>; +def : Pat<(i32 (extload ADDRrr:$src, i16)), (LDUHrr ADDRrr:$src)>; +def : Pat<(i32 (extload ADDRri:$src, i16)), (LDUHri ADDRri:$src)>;