[llvm] 56a5b4b - llvm-reduce: Test reduction for D88684 ( ee6e25e4391a6d3ac0a3c89615474e512f44cda6 )

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 13:23:04 PDT 2020


Author: David Blaikie
Date: 2020-10-26T13:16:00-07:00
New Revision: 56a5b4b1bfafa27dcc0fe48a3095ebc19ac26256

URL: https://github.com/llvm/llvm-project/commit/56a5b4b1bfafa27dcc0fe48a3095ebc19ac26256
DIFF: https://github.com/llvm/llvm-project/commit/56a5b4b1bfafa27dcc0fe48a3095ebc19ac26256.diff

LOG: llvm-reduce: Test reduction for D88684 ( ee6e25e4391a6d3ac0a3c89615474e512f44cda6 )

Added: 
    

Modified: 
    llvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll b/llvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll
index 7792fa782095..6aba640b7688 100644
--- a/llvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll
+++ b/llvm/test/Reduce/no-replace-intrinsic-callee-with-undef.ll
@@ -1,9 +1,9 @@
-; It's invalid to have a non-intrinsic call with a metadata argument,
-; so it's unproductive to replace the users of the intrinsic
-; declaration with undef.
+; Intrinsic calls can't be uniformly replaced with undef without invalidating
+; IR (eg: only intrinsic calls can have metadata arguments), so ensure they are
+; not replaced. The whole call instruction can be removed by instruction
+; reduction instead.
 
 ; RUN: llvm-reduce --test FileCheck --test-arg --check-prefixes=ALL,CHECK-INTERESTINGNESS --test-arg %s --test-arg --input-file %s -o %t 2> %t.log
-; RUN: FileCheck -check-prefix=STDERR %s < %t.log
 ; RUN: cat %t | FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-FINAL %s
 
 ; Check that the call is removed by instruction reduction passes
@@ -11,20 +11,18 @@
 ; RUN: cat %t | FileCheck -implicit-check-not=uninteresting --check-prefixes=ALL,CHECK-NOCALL %s
 
 
-; STDERR-NOT: Function has metadata parameter but isn't an intrinsic
-
-declare i32 @llvm.amdgcn.reloc.constant(metadata)
+declare i8* @llvm.sponentry.p0i8()
 declare void @uninteresting()
 
-; ALL-LABEL: define i32 @interesting(
-define i32 @interesting() {
+; ALL-LABEL: define i8* @interesting(
+define i8* @interesting() {
 entry:
   ; CHECK-INTERESTINGNESS: call
   ; CHECK-NOCALL-NOT: call
 
-  ; CHECK-FINAL: %call = call i32 @llvm.amdgcn.reloc.constant(metadata !"arst")
-  ; CHECK-FINAL-NEXT: ret i32 %call
-  %call = call i32 @llvm.amdgcn.reloc.constant(metadata !"arst")
+  ; CHECK-FINAL: %call = call i8* @llvm.sponentry.p0i8()
+  ; CHECK-FINAL-NEXT: ret i8* %call
+  %call = call i8* @llvm.sponentry.p0i8()
   call void @uninteresting()
-  ret i32 %call
+  ret i8* %call
 }


        


More information about the llvm-commits mailing list