ppcf128-no-fold.ll 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. ; RUN: opt < %s -sroa -S | FileCheck %s
  2. target datalayout = "E-m:e-i64:64-n32:64"
  3. target triple = "powerpc64-unknown-linux-gnu"
  4. %struct.ld2 = type { [2 x ppc_fp128] }
  5. declare void @bar(i8*, [2 x i128])
  6. define void @foo(i8* %v) #0 {
  7. entry:
  8. %v.addr = alloca i8*, align 8
  9. %z = alloca %struct.ld2, align 16
  10. store i8* %v, i8** %v.addr, align 8
  11. %dat = getelementptr inbounds %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  12. %arrayidx = getelementptr inbounds [2 x ppc_fp128], [2 x ppc_fp128]* %dat, i32 0, i64 0
  13. store ppc_fp128 0xM403B0000000000000000000000000000, ppc_fp128* %arrayidx, align 16
  14. %dat1 = getelementptr inbounds %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  15. %arrayidx2 = getelementptr inbounds [2 x ppc_fp128], [2 x ppc_fp128]* %dat1, i32 0, i64 1
  16. store ppc_fp128 0xM4093B400000000000000000000000000, ppc_fp128* %arrayidx2, align 16
  17. %0 = load i8*, i8** %v.addr, align 8
  18. %coerce.dive = getelementptr %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  19. %1 = bitcast [2 x ppc_fp128]* %coerce.dive to [2 x i128]*
  20. %2 = load [2 x i128], [2 x i128]* %1, align 1
  21. call void @bar(i8* %0, [2 x i128] %2)
  22. ret void
  23. }
  24. ; CHECK-LABEL: @foo
  25. ; CHECK-NOT: i128 4628293042053316608
  26. ; CHECK-NOT: i128 4653260752096854016
  27. ; CHECK-DAG: i128 bitcast (ppc_fp128 0xM403B0000000000000000000000000000 to i128)
  28. ; CHECK-DAG: i128 bitcast (ppc_fp128 0xM4093B400000000000000000000000000 to i128)
  29. ; CHECK: call void @bar(i8* %v, [2 x i128]
  30. ; CHECK: ret void
  31. attributes #0 = { nounwind }