[PATCH] D152928: [RFC][DAG] Initially add nodes in the worklist in topological order.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 04:28:59 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/abds.ll:31
+; X64-NEXT:    cmovsq %rcx, %rax
+; X64-NEXT:    # kill: def $al killed $al killed $rax
 ; X64-NEXT:    retq
----------------
```
  t0: ch,glue = EntryToken
              t2: i32,ch = CopyFromReg t0, Register:i32 %0
            t3: i8 = truncate t2
          t7: i64 = sign_extend t3
              t5: i32,ch = CopyFromReg t0, Register:i32 %1
            t6: i8 = truncate t5
          t8: i64 = sign_extend t6
        t9: i64 = sub t7, t8
      t10: i64 = abs t9
    t11: i8 = truncate t10
```
This has regressed because the sign_extend(truncate()) have already been folded to sign_extend_inreg(any_extend()) before foldABSToABD is called via visitTRUNCATE, meaning we only call it later via visitABS directly and lose the smaller types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152928/new/

https://reviews.llvm.org/D152928



More information about the llvm-commits mailing list