From a1251f24b5399bb8a0aabe778f8d0188a870d3c4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 19 Dec 2005 01:43:04 +0000 Subject: [PATCH] implement zextload bool git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24853 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/Sparc/SparcInstrInfo.td | 3 +++ lib/Target/SparcV8/SparcV8InstrInfo.td | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td index ba878892c5e..dbc3a4573d3 100644 --- a/lib/Target/Sparc/SparcInstrInfo.td +++ b/lib/Target/Sparc/SparcInstrInfo.td @@ -730,6 +730,9 @@ 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)>; +// zextload bool -> zextload byte +def : Pat<(i32 (zextload ADDRrr:$src, i1)), (LDUBrr ADDRrr:$src)>; + // truncstore bool -> truncstore byte. def : Pat<(truncstore IntRegs:$src, ADDRrr:$addr, i1), (STBrr IntRegs:$src, ADDRrr:$addr)>; diff --git a/lib/Target/SparcV8/SparcV8InstrInfo.td b/lib/Target/SparcV8/SparcV8InstrInfo.td index ba878892c5e..dbc3a4573d3 100644 --- a/lib/Target/SparcV8/SparcV8InstrInfo.td +++ b/lib/Target/SparcV8/SparcV8InstrInfo.td @@ -730,6 +730,9 @@ 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)>; +// zextload bool -> zextload byte +def : Pat<(i32 (zextload ADDRrr:$src, i1)), (LDUBrr ADDRrr:$src)>; + // truncstore bool -> truncstore byte. def : Pat<(truncstore IntRegs:$src, ADDRrr:$addr, i1), (STBrr IntRegs:$src, ADDRrr:$addr)>; -- 2.34.1