Skip to content

Instantly share code, notes, and snippets.

@minglotus
Created November 30, 2022 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minglotus/763173f099bec76c720ec9ce7c181471 to your computer and use it in GitHub Desktop.
Save minglotus/763173f099bec76c720ec9ce7c181471 to your computer and use it in GitHub Desktop.
Optimized lowered selection DAG: %bb.0 'shiftedreg_from_and_negative_type:'
SelectionDAG has 16 nodes:
t0: ch,glue = EntryToken
t4: i32,ch = CopyFromReg t0, Register:i32 %1
t6: i16 = truncate t4
t2: i32,ch = CopyFromReg t0, Register:i32 %0
t5: i16 = truncate t2
t9: i16 = shl t5, Constant:i64<2>
t11: i16 = and t9, Constant:i16<-32>
t12: i16 = sub t6, t11
t13: i32 = any_extend t12
t15: ch,glue = CopyToReg t0, Register:i32 $w0, t13
t16: ch = AArch64ISD::RET_FLAG t15, Register:i32 $w0, t15:1
Legalizing node: t14: i32 = Register $w0
Ignoring node results
Legally typed node: t14: i32 = Register $w0
Legalizing node: t10: i16 = Constant<-32>
Analyzing result type: i16
Promote integer result: t10: i16 = Constant<-32>
Creating constant: t17: i32 = Constant<-32>
Legalizing node: t17: i32 = Constant<-32>
Analyzing result type: i32
Legal result type
Legally typed node: t17: i32 = Constant<-32>
Legalizing node: t8: i64 = Constant<2>
Analyzing result type: i64
Legal result type
Legally typed node: t8: i64 = Constant<2>
Legalizing node: t3: i32 = Register %1
Ignoring node results
Legally typed node: t3: i32 = Register %1
Legalizing node: t1: i32 = Register %0
Ignoring node results
Legally typed node: t1: i32 = Register %0
Legalizing node: t0: ch,glue = EntryToken
Analyzing result type: ch
Legal result type
Analyzing result type: glue
Legal result type
Legally typed node: t0: ch,glue = EntryToken
Legalizing node: t2: i32,ch = CopyFromReg t0, Register:i32 %0
Analyzing result type: i32
Legal result type
Analyzing result type: ch
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Legally typed node: t2: i32,ch = CopyFromReg t0, Register:i32 %0
Legalizing node: t5: i16 = truncate t2
Analyzing result type: i16
Promote integer result: t5: i16 = truncate t2
Legalizing node: t9: i16 = shl t5, Constant:i64<2>
Analyzing result type: i16
Promote integer result: t9: i16 = shl t5, Constant:i64<2>
Creating new node: t18: i32 = shl t2, Constant:i64<2>
Legalizing node: t11: i16 = and t9, Constant:i16<-32>
Analyzing result type: i16
Promote integer result: t11: i16 = and t9, Constant:i16<-32>
Creating new node: t19: i32 = and t18, Constant:i32<-32>
Legalizing node: t18: i32 = shl t2, Constant:i64<2>
Analyzing result type: i32
Legal result type
Analyzing operand: t2: i32,ch = CopyFromReg t0, Register:i32 %0
Legal operand
Analyzing operand: t8: i64 = Constant<2>
Legal operand
Legally typed node: t18: i32 = shl t2, Constant:i64<2>
Legalizing node: t19: i32 = and t18, Constant:i32<-32>
Analyzing result type: i32
Legal result type
Analyzing operand: t18: i32 = shl t2, Constant:i64<2>
Legal operand
Analyzing operand: t17: i32 = Constant<-32>
Legal operand
Legally typed node: t19: i32 = and t18, Constant:i32<-32>
Legalizing node: t4: i32,ch = CopyFromReg t0, Register:i32 %1
Analyzing result type: i32
Legal result type
Analyzing result type: ch
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Legally typed node: t4: i32,ch = CopyFromReg t0, Register:i32 %1
Legalizing node: t6: i16 = truncate t4
Analyzing result type: i16
Promote integer result: t6: i16 = truncate t4
Legalizing node: t12: i16 = sub t6, t11
Analyzing result type: i16
Promote integer result: t12: i16 = sub t6, t11
Creating new node: t20: i32 = sub t4, t19
Legalizing node: t13: i32 = any_extend t12
Analyzing result type: i32
Legal result type
Analyzing operand: t12: i16 = sub t6, t11
Promote integer operand: t13: i32 = any_extend t12
Replacing: t13: i32 = any_extend t12
with: t20: i32 = sub t4, t19
Legalizing node: t20: i32 = sub t4, t19
Analyzing result type: i32
Legal result type
Analyzing operand: t4: i32,ch = CopyFromReg t0, Register:i32 %1
Legal operand
Analyzing operand: t19: i32 = and t18, Constant:i32<-32>
Legal operand
Legally typed node: t20: i32 = sub t4, t19
Legalizing node: t15: ch,glue = CopyToReg t0, Register:i32 $w0, t20
Analyzing result type: ch
Legal result type
Analyzing result type: glue
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Analyzing operand: t20: i32 = sub t4, t19
Legal operand
Legally typed node: t15: ch,glue = CopyToReg t0, Register:i32 $w0, t20
Legalizing node: t16: ch = AArch64ISD::RET_FLAG t15, Register:i32 $w0, t15:1
Analyzing result type: ch
Legal result type
Analyzing operand: t15: ch,glue = CopyToReg t0, Register:i32 $w0, t20
Legal operand
Analyzing operand: t15: ch,glue = CopyToReg t0, Register:i32 $w0, t20
Legal operand
Legally typed node: t16: ch = AArch64ISD::RET_FLAG t15, Register:i32 $w0, t15:1
Legalizing node: t65535: ch = handlenode t16
Analyzing result type: ch
Legal result type
Analyzing operand: t16: ch = AArch64ISD::RET_FLAG t15, Register:i32 $w0, t15:1
Legal operand
Legally typed node: t65535: ch = handlenode t16
Type-legalized selection DAG: %bb.0 'shiftedreg_from_and_negative_type:'
SelectionDAG has 13 nodes:
t0: ch,glue = EntryToken
t4: i32,ch = CopyFromReg t0, Register:i32 %1
t2: i32,ch = CopyFromReg t0, Register:i32 %0
t18: i32 = shl t2, Constant:i64<2>
t19: i32 = and t18, Constant:i32<-32>
t20: i32 = sub t4, t19
t15: ch,glue = CopyToReg t0, Register:i32 $w0, t20
t16: ch = AArch64ISD::RET_FLAG t15, Register:i32 $w0, t15:1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment