diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2019-10-13 23:00:15 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2019-10-13 23:00:15 +0000 |
commit | e4300c392de28b659749d77b415b4903786caa0c (patch) | |
tree | e2932a42e822bdc97da8cc30e6d80dd87c0518ec /llvm/test/Transforms/CodeGenPrepare/X86 | |
parent | 529f4ed401ea9761461fb42b1efa552c320c40fb (diff) | |
download | bcm5719-llvm-e4300c392de28b659749d77b415b4903786caa0c.tar.gz bcm5719-llvm-e4300c392de28b659749d77b415b4903786caa0c.zip |
Add a pass to lower is.constant and objectsize intrinsics
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.
The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.
Differential Revision: https://reviews.llvm.org/D65280
llvm-svn: 374743
Diffstat (limited to 'llvm/test/Transforms/CodeGenPrepare/X86')
-rw-r--r-- | llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll b/llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll index fc6d66a6082..9ba1d7db5ad 100644 --- a/llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll +++ b/llvm/test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll @@ -514,26 +514,6 @@ exit: ret void } -; This was crashing when trying to delay instruction removal/deletion. - -declare i64 @llvm.objectsize.i64.p0i8(i8*, i1 immarg, i1 immarg, i1 immarg) #0 - -define hidden fastcc void @crash() { -; CHECK-LABEL: @crash( -; CHECK-NEXT: [[TMP1:%.*]] = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 undef, i64 undef) -; CHECK-NEXT: [[MATH:%.*]] = extractvalue { i64, i1 } [[TMP1]], 0 -; CHECK-NEXT: [[OV:%.*]] = extractvalue { i64, i1 } [[TMP1]], 1 -; CHECK-NEXT: [[T2:%.*]] = select i1 undef, i1 undef, i1 [[OV]] -; CHECK-NEXT: unreachable -; - %t0 = add i64 undef, undef - %t1 = icmp ult i64 %t0, undef - %t2 = select i1 undef, i1 undef, i1 %t1 - %t3 = call i64 @llvm.objectsize.i64.p0i8(i8* nonnull undef, i1 false, i1 false, i1 false) - %t4 = icmp ugt i64 %t3, 7 - unreachable -} - ; Check that every instruction inserted by -codegenprepare has a debug location. ; DEBUG: CheckModuleDebugify: PASS |