[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-06-10 Thread Chandler Carruth via Phabricator via cfe-commits
chandlerc requested changes to this revision.
chandlerc added a comment.
This revision now requires changes to proceed.

I think this ultimately needs to be split up into smaller patches. A bunch of 
these things can be landed independently. Here is my first cut at things to 
split out, each one into its own patch.

1. the LLVM change to the always inliner
2. the Clang change to how we build the always inliner
3. the PGO pipeline changes (which I have to admit I still don't fully 
understand)
4. The additions of `-fno-experimental-new-pass-manager` for test cases that 
are explicitly testing legacy PM behavior
5. switching tests to be resilient to changes in attribute group numbering (and 
adding a RUN line w/ the new PM to ensure we don't regress)

for #5 (or others) where *some* testing needs to be working before they can 
land, just sequence them after whatever they depend on

Other things I think can also be split out, but I suspect into *different* 
changes from what you have here:

6. Instead of passing `-fno-experimental-new-pass-manager` for tests that use 
`-O` but don't specify a number, Clang should pick a consistent value for the 
level I think

I'd be interested to then see what is left here.




Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104-1105
   // which is just that always inlining occurs.
-  MPM.addPass(AlwaysInlinerPass());
+  // We always pass false here since according to the legacy PM logic for
+  // enabling lifetime intrinsics, we should not be compiling with O0.
+  MPM.addPass(AlwaysInlinerPass(/*InsertLifetimeIntrinsics=*/false));

leonardchan wrote:
> serge-sans-paille wrote:
> > echristo wrote:
> > > Can you elaborate more here? We do turn on the always inliner at O0 which 
> > > makes this comment a bit confusing.
> > I guess he means 
> > 
> > We always pass false here since according to the legacy PM logic for 
> > enabling lifetime intrinsics, they are not required with O0
> > 
> Yup, my bad. This is what I meant with this comment. Always inlining is used. 
> It's the lifetime intrinsics that aren't always used.
I don't think explaining it in terms of one pass manager or another is the righ 
thing to do.

Instead, I'd say what the desired result is:

```
Build a minimal pipeline based on the semantics required by Clang,
which is just that always inlining occurs. Further, disable generating
lifetime intrinsics to avoid enabling further optimizations during
code generation.
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-06-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment.

In D62225#1519394 , @efriedma wrote:

> Are the behavior differences between the newpm alwaysinliner and the oldpm 
> alwaysinliner intentional?  Specifically, the differences in pass remarks, 
> and the differences in the treatment of the alwaysinline attribute seem 
> suspect.  (I'm not that interested in the different bitcasts and different 
> order of inline allocas, although that might be nice to fix if it's a small 
> change.)


This is something for @chandlerc to answer, but I think based off D23299 
 the different treatment of `alwaysinline` was 
intentional and the other aspects of it that this patch addresses like the 
`AddAlignmentAssumptions` are probably things that were overlooked at the time.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-28 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment.

Are the behavior differences between the newpm alwaysinliner and the oldpm 
alwaysinliner intentional?  Specifically, the differences in pass remarks, and 
the differences in the treatment of the alwaysinline attribute seem suspect.  
(I'm not that interested in the different bitcasts and different order of 
inline allocas, although that might be nice to fix if it's a small change.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-23 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 201089.
leonardchan edited the summary of this revision.
Herald added a subscriber: aprantl.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  clang/test/CodeGen/aarch64-neon-across.c
  clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
  clang/test/CodeGen/aarch64-neon-fma.c
  clang/test/CodeGen/aarch64-neon-perm.c
  clang/test/CodeGen/aarch64-neon-tbl.c
  clang/test/CodeGen/aarch64-poly128.c
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
  clang/test/CodeGen/aggregate-assign-call.c
  clang/test/CodeGen/arm-neon-fma.c
  clang/test/CodeGen/arm-neon-numeric-maxmin.c
  clang/test/CodeGen/arm-neon-vcvtX.c
  clang/test/CodeGen/arm_acle.c
  clang/test/CodeGen/available-externally-suppress.c
  clang/test/CodeGen/avx-builtins.c
  clang/test/CodeGen/builtin-movdir.c
  clang/test/CodeGen/builtins-ppc-p9vector.c
  clang/test/CodeGen/builtins-ppc-vsx.c
  clang/test/CodeGen/flatten.c
  clang/test/CodeGen/lto-newpm-pipeline.c
  clang/test/CodeGen/pgo-instrumentation.c
  clang/test/CodeGen/pgo-sample.c
  clang/test/CodeGen/split-debug-single-file.c
  clang/test/CodeGen/sse-builtins.c
  clang/test/CodeGen/sse2-builtins.c
  clang/test/CodeGen/x86_64-instrument-functions.c
  clang/test/CodeGenCXX/conditional-temporaries.cpp
  clang/test/CodeGenCXX/flatten.cpp
  clang/test/CodeGenCXX/member-function-pointer-calls.cpp
  clang/test/CodeGenObjC/os_log.m
  clang/test/CodeGenOpenCL/convergent.cl
  clang/test/CoverageMapping/unused_names.c
  llvm/lib/Transforms/IPO/AlwaysInliner.cpp

Index: llvm/lib/Transforms/IPO/AlwaysInliner.cpp
===
--- llvm/lib/Transforms/IPO/AlwaysInliner.cpp
+++ llvm/lib/Transforms/IPO/AlwaysInliner.cpp
@@ -31,8 +31,17 @@
 
 #define DEBUG_TYPE "inline"
 
-PreservedAnalyses AlwaysInlinerPass::run(Module &M, ModuleAnalysisManager &) {
-  InlineFunctionInfo IFI;
+PreservedAnalyses AlwaysInlinerPass::run(Module &M, ModuleAnalysisManager &AM) {
+  // Attach an inline assumption cache such that AddAlignmentAssumptions() is
+  // called to match the codegen for the legacy PM.
+  FunctionAnalysisManager &FAM =
+  AM.getResult(M).getManager();
+  std::function GetAssumptionCache =
+  [&](Function &F) -> AssumptionCache & {
+return FAM.getResult(F);
+  };
+  InlineFunctionInfo IFI(/*cg=*/nullptr, &GetAssumptionCache);
+
   SmallSetVector Calls;
   bool Changed = false;
   SmallVector InlinedFunctions;
Index: clang/test/CoverageMapping/unused_names.c
===
--- clang/test/CoverageMapping/unused_names.c
+++ clang/test/CoverageMapping/unused_names.c
@@ -1,5 +1,3 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
 // RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name unused_names.c -o - %s > %t
 // RUN: FileCheck -input-file %t %s
 // RUN: FileCheck -check-prefix=SYSHEADER -input-file %t %s
Index: clang/test/CodeGenOpenCL/convergent.cl
===
--- clang/test/CodeGenOpenCL/convergent.cl
+++ clang/test/CodeGenOpenCL/convergent.cl
@@ -1,6 +1,5 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
-// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm %s -o - | opt -instnamer -S | FileCheck -enable-var-scope %s
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm %s -o - -fno-experimental-new-pass-manager | opt -instnamer -S | FileCheck -enable-var-scope %s --check-prefixes=CHECK,CHECK-LEGACY
+// RUN: %clang_cc1 -triple spir-unknown-unknown -emit-llvm %s -o - -fexperimental-new-pass-manager | opt -instnamer -S | FileCheck -enable-var-scope %s --check-prefixes=CHECK,CHECK-NEWPM
 
 // This is initially assumed convergent, but can be deduced to not require it.
 
@@ -119,7 +118,12 @@
 // CHECK: [[for_body]]:
 // CHECK:  tail call spir_func void @nodupfun() #[[attr5:[0-9]+]]
 // CHECK-NOT: call spir_func void @nodupfun()
-// CHECK:  br i1 %{{.+}}, label %[[for_body]], label %[[for_cond_cleanup]]
+
+// The new PM produces a slightly different IR for the loop from the legacy PM,
+// but the test still checks that the loop is not unrolled.
+// CHECK-LEGACY:  br i1 %{{.+}}, label %[[for_body]], label %[[for_cond_cleanup]]
+// CHECK-NEW: br i1 %{{.+}}, label %[[for_body_crit_edge:.+]], label %[[for_cond_cleanup]]
+// CHECK-NEW: [[for_body_crit_edge]]:
 
 void test_not_unroll() {
   for (int i = 0; i < 10; i++)
Index: clang/test/CodeGenObjC/os_log.m
===
--- clang/test/CodeGenObjC/os_log.m
+++ clang/test/CodeGenObjC/os_log.m
@@ -1,6 +1,4 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
-// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-apple -fobjc-arc -O2 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple x86_64-darwin-app

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 200860.
leonardchan marked an inline comment as done.
leonardchan edited the summary of this revision.
Herald added subscribers: llvm-commits, dexonsmith, steven_wu, kbarton, 
hiraditya, eraman, nemanjai, mehdi_amini.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  clang/test/CodeGen/aarch64-neon-across.c
  clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
  clang/test/CodeGen/aarch64-neon-fma.c
  clang/test/CodeGen/aarch64-neon-perm.c
  clang/test/CodeGen/aarch64-neon-tbl.c
  clang/test/CodeGen/aarch64-poly128.c
  clang/test/CodeGen/aarch64-v8.2a-neon-intrinsics.c
  clang/test/CodeGen/aggregate-assign-call.c
  clang/test/CodeGen/arm-neon-fma.c
  clang/test/CodeGen/arm-neon-numeric-maxmin.c
  clang/test/CodeGen/arm-neon-vcvtX.c
  clang/test/CodeGen/arm_acle.c
  clang/test/CodeGen/available-externally-suppress.c
  clang/test/CodeGen/avx-builtins.c
  clang/test/CodeGen/builtin-movdir.c
  clang/test/CodeGen/builtins-ppc-p9vector.c
  clang/test/CodeGen/builtins-ppc-vsx.c
  clang/test/CodeGen/flatten.c
  clang/test/CodeGen/lto-newpm-pipeline.c
  clang/test/CodeGen/pgo-instrumentation.c
  llvm/lib/Transforms/IPO/AlwaysInliner.cpp

Index: llvm/lib/Transforms/IPO/AlwaysInliner.cpp
===
--- llvm/lib/Transforms/IPO/AlwaysInliner.cpp
+++ llvm/lib/Transforms/IPO/AlwaysInliner.cpp
@@ -31,8 +31,17 @@
 
 #define DEBUG_TYPE "inline"
 
-PreservedAnalyses AlwaysInlinerPass::run(Module &M, ModuleAnalysisManager &) {
-  InlineFunctionInfo IFI;
+PreservedAnalyses AlwaysInlinerPass::run(Module &M, ModuleAnalysisManager &AM) {
+  // Attach an inline assumption cache such that AddAlignmentAssumptions() is
+  // called to match the codegen for the legacy PM.
+  FunctionAnalysisManager &FAM =
+  AM.getResult(M).getManager();
+  std::function GetAssumptionCache =
+  [&](Function &F) -> AssumptionCache & {
+return FAM.getResult(F);
+  };
+  InlineFunctionInfo IFI(/*cg=*/nullptr, &GetAssumptionCache);
+
   SmallSetVector Calls;
   bool Changed = false;
   SmallVector InlinedFunctions;
Index: clang/test/CodeGen/pgo-instrumentation.c
===
--- clang/test/CodeGen/pgo-instrumentation.c
+++ clang/test/CodeGen/pgo-instrumentation.c
@@ -1,10 +1,8 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
 // Test if PGO instrumentation and use pass are invoked.
 //
 // Ensure Pass PGOInstrumentationGenPass is invoked.
-// RUN: %clang_cc1 -O2 -fprofile-instrument=llvm %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN --check-prefix=CHECK-INSTRPROF
-// RUN: %clang_cc1 -O2 -fprofile-instrument=llvm %s  -fexperimental-new-pass-manager -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN-NEWPM --check-prefix=CHECK-INSTRPROF-NEWPM
+// RUN: %clang_cc1 -O2 -fprofile-instrument=llvm %s -fno-experimental-new-pass-manager -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN --check-prefix=CHECK-INSTRPROF
+// RUN: %clang_cc1 -O2 -fprofile-instrument=llvm %s -fexperimental-new-pass-manager -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=CHECK-PGOGENPASS-INVOKED-INSTR-GEN-NEWPM --check-prefix=CHECK-INSTRPROF-NEWPM
 // CHECK-PGOGENPASS-INVOKED-INSTR-GEN: PGOInstrumentationGenPass
 // CHECK-INSTRPROF: Frontend instrumentation-based coverage lowering
 // CHECK-PGOGENPASS-INVOKED-INSTR-GEN-NEWPM: Running pass: PGOInstrumentationGen on
@@ -16,16 +14,16 @@
 // CHECK-PGOGENPASS-INVOKED-INSTR-GEN-CLANG-NOT: PGOInstrumentationGenPass
 // CHECK-PGOGENPASS-INVOKED-INSTR-GEN-CLANG-NEWPM-NOT: Running pass: PGOInstrumentationGen on
 
-// RUN: %clang_cc1 -O2 -fprofile-instrument=clang %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-CLANG-INSTRPROF
+// RUN: %clang_cc1 -O2 -fprofile-instrument=clang %s -fno-experimental-new-pass-manager -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-CLANG-INSTRPROF
 // RUN: %clang_cc1 -O2 -fprofile-instrument=clang %s -fexperimental-new-pass-manager -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-CLANG-INSTRPROF-NEWPM
-// RUN: %clang_cc1 -O0 -fprofile-instrument=clang %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-CLANG-INSTRPROF
+// RUN: %clang_cc1 -O0 -fprofile-instrument=clang %s -fno-experimental-new-pass-manager -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-CLANG-INSTRPROF
 // RUN: %clang_cc1 -O0 -fprofile-instrument=clang %s -fexperimental-new-pass-manager -fdebug-pass-manager -emit-llvm -o - 2>&1 | FileCheck %s 

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked 4 inline comments as done.
leonardchan added inline comments.



Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104-1105
   // which is just that always inlining occurs.
-  MPM.addPass(AlwaysInlinerPass());
+  // We always pass false here since according to the legacy PM logic for
+  // enabling lifetime intrinsics, we should not be compiling with O0.
+  MPM.addPass(AlwaysInlinerPass(/*InsertLifetimeIntrinsics=*/false));

serge-sans-paille wrote:
> echristo wrote:
> > Can you elaborate more here? We do turn on the always inliner at O0 which 
> > makes this comment a bit confusing.
> I guess he means 
> 
> We always pass false here since according to the legacy PM logic for 
> enabling lifetime intrinsics, they are not required with O0
> 
Yup, my bad. This is what I meant with this comment. Always inlining is used. 
It's the lifetime intrinsics that aren't always used.



Comment at: clang/test/CodeGen/aarch64-neon-fma.c:235
 // CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="128"
+// CHECK: attributes [[NOUNWIND_ATTR]] = { nounwind }

echristo wrote:
> Do we really need to check for it or does the autogeneration of testcases do 
> some of this?
I do not know if this is actually an autogenerated test, but if so then 
probably not. Is there a way to check this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-21 Thread serge via Phabricator via cfe-commits
serge-sans-paille added inline comments.



Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104-1105
   // which is just that always inlining occurs.
-  MPM.addPass(AlwaysInlinerPass());
+  // We always pass false here since according to the legacy PM logic for
+  // enabling lifetime intrinsics, we should not be compiling with O0.
+  MPM.addPass(AlwaysInlinerPass(/*InsertLifetimeIntrinsics=*/false));

echristo wrote:
> Can you elaborate more here? We do turn on the always inliner at O0 which 
> makes this comment a bit confusing.
I guess he means 

We always pass false here since according to the legacy PM logic for 
enabling lifetime intrinsics, they are not required with O0



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-21 Thread Eric Christopher via Phabricator via cfe-commits
echristo added inline comments.



Comment at: clang/lib/CodeGen/BackendUtil.cpp:1104-1105
   // which is just that always inlining occurs.
-  MPM.addPass(AlwaysInlinerPass());
+  // We always pass false here since according to the legacy PM logic for
+  // enabling lifetime intrinsics, we should not be compiling with O0.
+  MPM.addPass(AlwaysInlinerPass(/*InsertLifetimeIntrinsics=*/false));

Can you elaborate more here? We do turn on the always inliner at O0 which makes 
this comment a bit confusing.



Comment at: clang/test/CodeGen/aarch64-neon-fma.c:235
 // CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="128"
+// CHECK: attributes [[NOUNWIND_ATTR]] = { nounwind }

Do we really need to check for it or does the autogeneration of testcases do 
some of this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62225



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-05-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision.
leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille.
leonardchan added a project: clang.
Herald added subscribers: kristof.beyls, javed.absar.

This is a patch that should go on top of D58375 
 which addresses/fixes tests that fail under 
new PM with -O0.

This is still ongoing and will ask for reviews once all of them are fixed. 
These are currently the latest ones I have updated so far.

Current reasons for fixes:

- Some aarch64 tests specified attribute numbers explicitly where as new pm 
uses the same attributes but different numbers.
- `CodeGen/aarch64-neon-perm.c` failed because new PM would insert lifetime 
start/end intrinsics even under -O0.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D62225

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  clang/test/CodeGen/aarch64-neon-across.c
  clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
  clang/test/CodeGen/aarch64-neon-fma.c
  clang/test/CodeGen/aarch64-neon-perm.c

Index: clang/test/CodeGen/aarch64-neon-perm.c
===
--- clang/test/CodeGen/aarch64-neon-perm.c
+++ clang/test/CodeGen/aarch64-neon-perm.c
@@ -1,5 +1,3 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
 // RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
 
Index: clang/test/CodeGen/aarch64-neon-fma.c
===
--- clang/test/CodeGen/aarch64-neon-fma.c
+++ clang/test/CodeGen/aarch64-neon-fma.c
@@ -1,5 +1,3 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
 
 // Test new aarch64 intrinsics and types
@@ -226,7 +224,7 @@
 // CHECK:   [[SUB_I:%.*]] = fsub <2 x double> , %b
 // CHECK:   [[VECINIT_I:%.*]] = insertelement <2 x double> undef, double %c, i32 0
 // CHECK:   [[VECINIT1_I:%.*]] = insertelement <2 x double> [[VECINIT_I]], double %c, i32 1
-// CHECK:   [[TMP6:%.*]] = call <2 x double> @llvm.fma.v2f64(<2 x double> [[SUB_I]], <2 x double> [[VECINIT1_I]], <2 x double> %a) #3
+// CHECK:   [[TMP6:%.*]] = call <2 x double> @llvm.fma.v2f64(<2 x double> [[SUB_I]], <2 x double> [[VECINIT1_I]], <2 x double> %a) [[NOUNWIND_ATTR:#[0-9]+]]
 // CHECK:   ret <2 x double> [[TMP6]]
 float64x2_t test_vfmsq_n_f64(float64x2_t a, float64x2_t b, float64_t c) {
   return vfmsq_n_f64(a, b, c);
@@ -234,3 +232,4 @@
 
 // CHECK: attributes #0 ={{.*}}"min-legal-vector-width"="64"
 // CHECK: attributes #1 ={{.*}}"min-legal-vector-width"="128"
+// CHECK: attributes [[NOUNWIND_ATTR]] = { nounwind }
Index: clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
===
--- clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
+++ clang/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
@@ -1,5 +1,3 @@
-// UNSUPPORTED: experimental-new-pass-manager
-
 // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
 // RUN:  -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s
 
@@ -8,119 +6,119 @@
 #include 
 
 // CHECK-LABEL: define float @test_vcvtxd_f32_f64(double %a) #0 {
-// CHECK:   [[VCVTXD_F32_F64_I:%.*]] = call float @llvm.aarch64.sisd.fcvtxn(double %a) #2
+// CHECK:   [[VCVTXD_F32_F64_I:%.*]] = call float @llvm.aarch64.sisd.fcvtxn(double %a) [[NOUNWIND_ATTR:#[0-9]+]]
 // CHECK:   ret float [[VCVTXD_F32_F64_I]]
 float32_t test_vcvtxd_f32_f64(float64_t a) {
   return (float32_t)vcvtxd_f32_f64(a);
 }
 
 // CHECK-LABEL: define i32 @test_vcvtas_s32_f32(float %a) #0 {
-// CHECK:   [[VCVTAS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtas.i32.f32(float %a) #2
+// CHECK:   [[VCVTAS_S32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtas.i32.f32(float %a) [[NOUNWIND_ATTR]]
 // CHECK:   ret i32 [[VCVTAS_S32_F32_I]]
 int32_t test_vcvtas_s32_f32(float32_t a) {
   return (int32_t)vcvtas_s32_f32(a);
 }
 
 // CHECK-LABEL: define i64 @test_test_vcvtad_s64_f64(double %a) #0 {
-// CHECK:   [[VCVTAD_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtas.i64.f64(double %a) #2
+// CHECK:   [[VCVTAD_S64_F64_I:%.*]] = call i64 @llvm.aarch64.neon.fcvtas.i64.f64(double %a) [[NOUNWIND_ATTR]]
 // CHECK:   ret i64 [[VCVTAD_S64_F64_I]]
 int64_t test_test_vcvtad_s64_f64(float64_t a) {
   return (int64_t)vcvtad_s64_f64(a);
 }
 
 // CHECK-LABEL: define i32 @test_vcvtas_u32_f32(float %a) #0 {
-// CHECK:   [[VCVTAS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtau.i32.f32(float %a) #2
+// CHECK:   [[VCVTAS_U32_F32_I:%.*]] = call i32 @llvm.aarch64.neon.fcvtau.i32.f32(float %a) [[NOUNWIND_ATTR]]
 // CHECK:   ret i32 [[VCVTAS_U32_F32_I]]
 uint32_t test_vcvtas_u32_f32(float32_t a) {
   return (uint32_t)vcvtas_u32_f32(a);
 }
 
 // CHECK-LABEL: define i64 @test_vcvtad_u64_f64(double %a) #0 {
-// CHECK:   [[