Skip to content

Instantly share code, notes, and snippets.

@minglotus-6
Created December 14, 2022 00:14
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-6/dd2c75a2253b128081125a578e7ff6c6 to your computer and use it in GitHub Desktop.
Save minglotus-6/dd2c75a2253b128081125a578e7ff6c6 to your computer and use it in GitHub Desktop.
=== orn_not_generated_for_small_constant
Creating new node: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Creating new node: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Creating new node: t6: i64,ch = CopyFromReg t0, Register:i64 %2
Creating constant: t7: i64 = Constant<-1>
Creating new node: t8: i64 = xor t2, Constant:i64<-1>
Creating constant: t9: i64 = Constant<2>
Creating new node: t10: i64 = or t8, Constant:i64<2>
Creating new node: t11: i64 = and t10, t4
Creating new node: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Creating new node: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Initial selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 15 nodes:
t0: ch,glue = EntryToken
t6: i64,ch = CopyFromReg t0, Register:i64 %2
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = xor t2, Constant:i64<-1>
t10: i64 = or t8, Constant:i64<2>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = and t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Combining: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Custom combining: skipping
Combining: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Combining: t12: i64 = Register $x0
Combining: t11: i64 = and t10, t4
Combining: t10: i64 = or t8, Constant:i64<2>
Combining: t9: i64 = Constant<2>
Combining: t8: i64 = xor t2, Constant:i64<-1>
Combining: t7: i64 = Constant<-1>
Combining: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Combining: t3: i64 = Register %1
Combining: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Combining: t1: i64 = Register %0
Combining: t0: ch,glue = EntryToken
Optimized lowered selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 13 nodes:
t0: ch,glue = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = xor t2, Constant:i64<-1>
t10: i64 = or t8, Constant:i64<2>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = and t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legalizing node: t12: i64 = Register $x0
Ignoring node results
Legally typed node: t12: i64 = Register $x0
Legalizing node: t9: i64 = Constant<2>
Analyzing result type: i64
Legal result type
Legally typed node: t9: i64 = Constant<2>
Legalizing node: t7: i64 = Constant<-1>
Analyzing result type: i64
Legal result type
Legally typed node: t7: i64 = Constant<-1>
Legalizing node: t3: i64 = Register %1
Ignoring node results
Legally typed node: t3: i64 = Register %1
Legalizing node: t1: i64 = Register %0
Ignoring node results
Legally typed node: t1: i64 = 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: i64,ch = CopyFromReg t0, Register:i64 %0
Analyzing result type: i64
Legal result type
Analyzing result type: ch
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Legally typed node: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Legalizing node: t8: i64 = xor t2, Constant:i64<-1>
Analyzing result type: i64
Legal result type
Analyzing operand: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Legal operand
Analyzing operand: t7: i64 = Constant<-1>
Legal operand
Legally typed node: t8: i64 = xor t2, Constant:i64<-1>
Legalizing node: t10: i64 = or t8, Constant:i64<2>
Analyzing result type: i64
Legal result type
Analyzing operand: t8: i64 = xor t2, Constant:i64<-1>
Legal operand
Analyzing operand: t9: i64 = Constant<2>
Legal operand
Legally typed node: t10: i64 = or t8, Constant:i64<2>
Legalizing node: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Analyzing result type: i64
Legal result type
Analyzing result type: ch
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Legally typed node: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Legalizing node: t11: i64 = and t10, t4
Analyzing result type: i64
Legal result type
Analyzing operand: t10: i64 = or t8, Constant:i64<2>
Legal operand
Analyzing operand: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Legal operand
Legally typed node: t11: i64 = and t10, t4
Legalizing node: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Analyzing result type: ch
Legal result type
Analyzing result type: glue
Legal result type
Analyzing operand: t0: ch,glue = EntryToken
Legal operand
Analyzing operand: t11: i64 = and t10, t4
Legal operand
Legally typed node: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legalizing node: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Analyzing result type: ch
Legal result type
Analyzing operand: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legal operand
Analyzing operand: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legal operand
Legally typed node: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legalizing node: t65535: ch = handlenode t14
Analyzing result type: ch
Legal result type
Analyzing operand: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legal operand
Legally typed node: t65535: ch = handlenode t14
Type-legalized selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 13 nodes:
t0: ch,glue = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = xor t2, Constant:i64<-1>
t10: i64 = or t8, Constant:i64<2>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = and t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legalizing: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legal node: nothing to do
Legalizing: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legal node: nothing to do
Legalizing: t11: i64 = and t10, t4
Legal node: nothing to do
Legalizing: t10: i64 = or t8, Constant:i64<2>
Legal node: nothing to do
Legalizing: t8: i64 = xor t2, Constant:i64<-1>
Trying custom legalization
Custom lowering: t8: i64 = xor t2, Constant:i64<-1>
Legalizing: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Legal node: nothing to do
Legalizing: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Legal node: nothing to do
Legalizing: t12: i64 = Register $x0
Legalizing: t9: i64 = Constant<2>
Legal node: nothing to do
Legalizing: t7: i64 = Constant<-1>
Legal node: nothing to do
Legalizing: t3: i64 = Register %1
Legalizing: t1: i64 = Register %0
Legalizing: t0: ch,glue = EntryToken
Legal node: nothing to do
Legalized selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 13 nodes:
t0: ch,glue = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = xor t2, Constant:i64<-1>
t10: i64 = or t8, Constant:i64<2>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = and t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legalizing: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Legal node: nothing to do
Combining: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
Custom combining: skipping
Legalizing: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legal node: nothing to do
Combining: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
Legalizing: t11: i64 = and t10, t4
Legal node: nothing to do
Combining: t11: i64 = and t10, t4
Legalizing: t10: i64 = or t8, Constant:i64<2>
Legal node: nothing to do
Combining: t10: i64 = or t8, Constant:i64<2>
Legalizing: t8: i64 = xor t2, Constant:i64<-1>
Trying custom legalization
Custom lowering: t8: i64 = xor t2, Constant:i64<-1>
Combining: t8: i64 = xor t2, Constant:i64<-1>
Legalizing: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Legal node: nothing to do
Combining: t4: i64,ch = CopyFromReg t0, Register:i64 %1
Legalizing: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Legal node: nothing to do
Combining: t2: i64,ch = CopyFromReg t0, Register:i64 %0
Legalizing: t12: i64 = Register $x0
Combining: t12: i64 = Register $x0
Legalizing: t9: i64 = Constant<2>
Legal node: nothing to do
Combining: t9: i64 = Constant<2>
Legalizing: t7: i64 = Constant<-1>
Legal node: nothing to do
Combining: t7: i64 = Constant<-1>
Legalizing: t3: i64 = Register %1
Combining: t3: i64 = Register %1
Legalizing: t1: i64 = Register %0
Combining: t1: i64 = Register %0
Legalizing: t0: ch,glue = EntryToken
Legal node: nothing to do
Combining: t0: ch,glue = EntryToken
Optimized legalized selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 13 nodes:
t0: ch,glue = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = xor t2, Constant:i64<-1>
t10: i64 = or t8, Constant:i64<2>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = and t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
===== Instruction selection begins: %bb.0 ''
ISEL: Starting selection on root node: t14: ch = AArch64ISD::RET_FLAG t13, Register:i64 $x0, t13:1
ISEL: Starting pattern match
Morphed node: t14: ch = RET_ReallyLR Register:i64 $x0, t13, t13:1
ISEL: Match complete!
ISEL: Starting selection on root node: t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
ISEL: Starting selection on root node: t11: i64 = and t10, t4
ISEL: Starting pattern match
Initial Opcode index to 293100
Match failed at index 293104
Continuing at 293470
Match failed at index 293473
Continuing at 293510
Match failed at index 293512
Continuing at 293550
Match failed at index 293551
Continuing at 293604
Match failed at index 293605
Continuing at 293659
Match failed at index 293662
Continuing at 294004
Match failed at index 294005
Continuing at 294046
Match failed at index 294047
Continuing at 294089
Match failed at index 294090
Continuing at 294134
Match failed at index 294135
Continuing at 294176
Match failed at index 294177
Continuing at 294219
Match failed at index 294220
Continuing at 294264
Match failed at index 294265
Continuing at 294298
Match failed at index 294299
Continuing at 294333
Match failed at index 294336
Continuing at 294365
Match failed at index 294367
Continuing at 294397
Match failed at index 294407
Continuing at 294450
Match failed at index 294451
Continuing at 294490
Match failed at index 294495
Continuing at 294507
Match failed at index 294508
Continuing at 294520
Morphed node: t11: i64 = ANDXrr t10, t4
ISEL: Match complete!
ISEL: Starting selection on root node: t10: i64 = or t8, Constant:i64<2>
ISEL: Starting pattern match
Initial Opcode index to 218896
Skipped scope entry (due to false predicate) at index 218901, continuing at 218954
Skipped scope entry (due to false predicate) at index 218955, continuing at 219008
Match failed at index 218899
Continuing at 219009
Match failed at index 219012
Continuing at 219049
TypeSwitch[i64] from 219059 to 219076
Match failed at index 219076
Continuing at 219089
Match failed at index 219106
Continuing at 219121
Creating constant: t15: i64 = TargetConstant<2>
Creating constant: t16: i32 = TargetConstant<8128>
Morphed node: t10: i64 = ORRXri t8, TargetConstant:i32<8128>
ISEL: Match complete!
ISEL: Starting selection on root node: t8: i64 = xor t2, Constant:i64<-1>
ISEL: Starting pattern match
Initial Opcode index to 326082
Match failed at index 326085
Continuing at 326177
Match failed at index 326180
Continuing at 326217
Match failed at index 326219
Continuing at 326279
Match failed at index 326285
Continuing at 326322
Skipped scope entry (due to false predicate) at index 326332, continuing at 326350
Skipped scope entry (due to false predicate) at index 326351, continuing at 326369
Match failed at index 326330
Continuing at 326370
Match failed at index 326371
Continuing at 326401
Match failed at index 326406
Continuing at 326418
Match failed at index 326419
Continuing at 326431
Continuing at 326432
Continuing at 326433
Continuing at 326434
Match failed at index 326436
Continuing at 326484
Match failed at index 326487
Continuing at 326504
Match failed at index 326506
Continuing at 326524
Match failed at index 326529
Continuing at 326546
TypeSwitch[i64] from 326549 to 326565
Morphed node: t8: i64 = ORNXrr Register:i64 $xzr, t2
ISEL: Match complete!
ISEL: Starting selection on root node: t4: i64,ch = CopyFromReg t0, Register:i64 %1
ISEL: Starting selection on root node: t2: i64,ch = CopyFromReg t0, Register:i64 %0
ISEL: Starting selection on root node: t12: i64 = Register $x0
ISEL: Starting selection on root node: t3: i64 = Register %1
ISEL: Starting selection on root node: t1: i64 = Register %0
ISEL: Starting selection on root node: t0: ch,glue = EntryToken
===== Instruction selection ends:
Selected selection DAG: %bb.0 'orn_not_generated_for_small_constant:'
SelectionDAG has 14 nodes:
t0: ch,glue = EntryToken
t2: i64,ch = CopyFromReg t0, Register:i64 %0
t8: i64 = ORNXrr Register:i64 $xzr, t2
t10: i64 = ORRXri t8, TargetConstant:i32<8128>
t4: i64,ch = CopyFromReg t0, Register:i64 %1
t11: i64 = ANDXrr t10, t4
t13: ch,glue = CopyToReg t0, Register:i64 $x0, t11
t15: i64 = TargetConstant<2>
t14: ch = RET_ReallyLR Register:i64 $x0, t13, t13:1
********** List Scheduling %bb.0 '' **********
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment