[clang] [llvm] [Reland] [PowerPC] frontend get target feature from backend with cpu name (PR #144594)

zhijian lin via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 08:33:37 PDT 2025


diggerlin wrote:

The patch exposes an underlying issue. I am able to reproduce the crash without the patch using the following IR

bash>  cat reduced.ll
```
target datalayout = "E-m:e-Fi64-i64:64-i128:128-n32:64"
target triple = "powerpc64"

define ptr @xe_migrate_copy(i1 %tobool, i1 %tobool6) {
entry:
  %src_L0 = alloca i64, align 8
  br label %if.then36

if.then36:                                        ; preds = %if.then36, %entry
  %0 = load i32, ptr null, align 4
  %tobool37.not = icmp eq i32 %0, 0
  %tobool.tobool6 = select i1 %tobool37.not, i1 %tobool, i1 %tobool6
  %1 = load i64, ptr %src_L0, align 8
  %conv55 = trunc i64 %1 to i32
  %call57 = call i32 null(ptr null, ptr null, i64 0, i1 %tobool.tobool6, i64 0, i1 false, i32 %conv55, i64 0, i1 false)
  br label %if.then36
}
```





https://github.com/llvm/llvm-project/pull/144594


More information about the llvm-commits mailing list