[PATCH] D128911: Emit table lookup from TargetLowering::expandCTTZ()
Shubham Narlawar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 07:18:38 PDT 2022
gsocshubham added a comment.
SelectionDAG at start of expandCTTZ() -
t0: ch = EntryToken
t2: i32,ch = CopyFromReg t0, Register:i32 %0
t3: i32 = cttz_zero_undef t2
t14: i32 = select_cc t2, Constant:i32<0>, Constant:i32<0>, t3, seteq:ch
t11: ch,glue = CopyToReg t0, Register:i32 $i0, t14
t13: ch = SPISD::RET_FLAG t11, Constant:i32<8>, Register:i32 $i0, t11:1
At the end of the function, I am adding below nodes -
t0: ch = EntryToken
t2: i32,ch = CopyFromReg t0, Register:i32 %0
t22: i32 = sub Constant:i32<0>, t2
t25: i32 = and t2, t22
t28: i32,i32 = smul_lohi t25, Constant:i32<125613361>
t27: i32 = srl t28, Constant:i32<27>
t15: glue = SPISD::CMPICC t2, Constant:i32<0>
t17: i32 = SPISD::SELECT_ICC Constant:i32<0>, t27, Constant:i32<1>, t15
t11: ch,glue = CopyToReg t0, Register:i32 $i0, t17
t13: ch = SPISD::RET_FLAG t11, Constant:i32<8>, Register:i32 $i0, t11:1
I want to attach below 2 DAG nodes -
t*: i32 = add GlobalAddress:i32<[32 x i8]* @f.table> 0, t9
t*: i32,ch = load<(load (s8) from %ir.arrayidx), zext from i8> t0, t12, undef:i32
but I am unable to fetch reference to f.table
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128911/new/
https://reviews.llvm.org/D128911
More information about the llvm-commits
mailing list