Issue 90900
Summary Reg2Mem pass triggered assertion `isa<To>(V al) && "cast<Ty>() argument of incompatible type!"
Labels new issue
Assignees
Reporter XChy
    https://godbolt.org/z/oxW8zbKr6
`opt --passes=reg2mem reduced.ll`
```llvm
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.__large_struct = type { [100 x i64] }

define fastcc i64 @__se_sys_pselect6() {
  %1 = callbr i64 asm sideeffect "\0A1:\09movq $1,$0\0A .pushsection \22__ex_table\22,\22a\22\0A .balign 4\0A .long (1b) - .\0A .long (${2:l}) - .\0A .long 3 \0A .popsection\0A", "=r,*m,!i,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(%struct.__large_struct) null)
          to label %2 [label %common.ret]

2:                                                ; preds = %0
  %3 = inttoptr i64 %1 to ptr
  %4 = callbr i64 asm sideeffect "\0A1:\09movq $1,$0\0A .pushsection \22__ex_table\22,\22a\22\0A .balign 4\0A .long (1b) - .\0A .long (${2:l}) - .\0A .long 3 \0A .popsection\0A", "=r,*m,!i,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(%struct.__large_struct) null)
          to label %common.ret [label %common.ret]

common.ret: ; preds = %2, %2, %0
  ret i64 0
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to