[PATCH] D144467: [IPSCCP] Don't require noundef for !range annotation

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 01:43:03 PDT 2023


tingwang added a comment.

I saw following case failed due to this commit with IPSCCPPass `opt -passes="ipsccp"`

  ; ModuleID = 'ld-temp.o'
  source_filename = "ld-temp.o"
  target datalayout = "e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512"
  target triple = "powerpc64le-unknown-linux-gnu"
  
  ; Function Attrs: noinline nounwind optnone uwtable
  define internal <2 x i64> @cntlzVector(<2 x i64> noundef %0) #0 {
    %2 = alloca <2 x i64>, align 16
    %3 = alloca <2 x i64>, align 16
    store <2 x i64> %0, ptr %3, align 16
    %4 = load <2 x i64>, ptr %3, align 16
    store <2 x i64> %4, ptr %2, align 16
    %5 = load <2 x i64>, ptr %2, align 16
    %6 = call <2 x i64> @llvm.ctlz.v2i64(<2 x i64> %5, i1 false)
    ret <2 x i64> %6
  }
  
  ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
  declare <2 x i64> @llvm.ctlz.v2i64(<2 x i64>, i1 immarg) #1
  
  ; Function Attrs: noinline nounwind optnone uwtable
  define dso_local signext i32 @main() #0 {
    %1 = alloca i32, align 4
    %2 = alloca <2 x i64>, align 16
    store i32 0, ptr %1, align 4
    %3 = load <2 x i64>, ptr %2, align 16
    %4 = call <2 x i64> @cntlzVector(<2 x i64> noundef %3)
    store <2 x i64> %4, ptr %2, align 16
    ret i32 0
  }
  
  attributes #0 = { noinline nounwind optnone uwtable "frame-pointer"="all" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="ppc64le" "target-features"="+altivec,+bpermd,+crbits,+crypto,+direct-move,+extdiv,+htm,+isa-v206-instructions,+isa-v207-instructions,+power8-vector,+vsx,-isa-v30-instructions,-power9-vector,-privileged,-quadword-atomics,-rop-protect,-spe" }
  attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn }
  
  !llvm.ident = !{!0}
  !llvm.module.flags = !{!1, !2, !3, !4, !5, !6, !7, !8}
  
  !0 = !{!""}
  !1 = !{i32 1, !"wchar_size", i32 4}
  !2 = !{i32 8, !"PIC Level", i32 2}
  !3 = !{i32 7, !"PIE Level", i32 2}
  !4 = !{i32 7, !"uwtable", i32 2}
  !5 = !{i32 7, !"frame-pointer", i32 2}
  !6 = !{i32 1, !"ThinLTO", i32 0}
  !7 = !{i32 1, !"EnableSplitLTOUnit", i32 1}
  !8 = !{i32 1, !"LTOPostLink", i32 1}


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144467



More information about the llvm-commits mailing list