[PATCH] D126689: [IR] Enable opaque pointers by default

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 07:32:10 PDT 2022


nikic added a comment.

@uabelho Here's a slightly cleaned up test case that does not use opaque pointers:

  target triple = "x86_64-unknown-linux-gnu"
  
  define void @test(i1 %cond, <1 x i16>* %p) {
    br label %loop
  
  loop:
    %v = load <1 x i16>, <1 x i16>* %p, align 2
    %ins = insertelement <4 x double> zeroinitializer, double 0.000000e+00, i32 0
    %cmp = fcmp uge <4 x double> %ins, zeroinitializer
    %ashr = ashr <1 x i16> %v, %v
    %shuf = shufflevector <4 x i1> %cmp, <4 x i1> zeroinitializer, <4 x i32> zeroinitializer
    br i1 %cond, label %loop, label %exit
  
  exit:
    %use1 = add <4 x i1> %shuf, zeroinitializer
    %use2 = add <1 x i16> %ashr, zeroinitializer
    ret void
  }

llvm-stress can probably generate certain code patterns when opaque pointers are enabled, which it does not produce when typed pointers are used. In this case at least, the used pointer type doesn't matter in the end.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126689



More information about the cfe-commits mailing list