- Notifications
You must be signed in to change notification settings - Fork 15.5k
Fix/172049 loop vectorize sigfpe #172094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dev-priyanshu15 wants to merge 12 commits into llvm:main Choose a base branch from dev-priyanshu15:fix/172049-loop-vectorize-sigfpe
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
+104 −8
Open
Fix/172049 loop vectorize sigfpe #172094
Changes from all commits
Commits
Show all changes
12 commits Select commit Hold shift + click to select a range
5bc0f4a [flang][OpenMP] Fix regression in OpenMP master region with private t…
dev-priyanshu15 4a09c49 [clang][libclang] Fix auto function parameter type reporting
dev-priyanshu15 eb942b2 [LLVM][LoopVectorize] Fix SIGFPE crash in getPredBlockCostDivisor
dev-priyanshu15 aa1e014 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 9ccfdeb Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 2402142 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 09835d6 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 7683c46 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 5fc70c0 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 34ec127 Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 43f362d Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 0dca4ab Merge branch 'main' into fix/172049-loop-vectorize-sigfpe
dev-priyanshu15 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Test case for auto function parameter reported as CXType_Auto | ||
| // This test verifies that auto parameters in function declarations | ||
| // are properly reported as CXType_Auto in the libclang C API | ||
| // See issue #172072 | ||
| | ||
| // RUN: c-index-test -test-type %s | FileCheck %s | ||
| | ||
| // Function with auto parameter | ||
| int bar(auto p) { | ||
| return p; | ||
| } | ||
| | ||
| // CHECK: FunctionDecl=bar:{{.*}} CXType_FunctionProto | ||
| // CHECK: ParmDecl=p:{{.*}} CXType_Auto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions 26 flang/test/Transforms/alias-tags-master-private-target.f90
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| ! Test case for regression in OpenMP master region with private target integer | ||
| ! This test was failing with an assertion error in AddAliasTags.cpp | ||
| ! See issue #172075 | ||
| | ||
| ! RUN: %flang -fopenmp -c -O1 %s -o %t.o 2>&1 | FileCheck %s --allow-empty | ||
| | ||
| module test | ||
| contains | ||
| subroutine omp_master_repro() | ||
| implicit none | ||
| integer, parameter :: nim = 4 | ||
| integer, parameter :: nvals = 8 | ||
| integer, target :: ui | ||
| integer :: hold1(nvals, nim) | ||
| hold1 = 0 | ||
| !$OMP PARALLEL DEFAULT(NONE) & | ||
| !$OMP PRIVATE(ui) & | ||
| !$OMP SHARED(hold1, nim) | ||
| !$OMP MASTER | ||
| do ui = 1, nim | ||
| hold1(:, ui) = 1 | ||
| end do | ||
| !$OMP END MASTER | ||
| !$OMP END PARALLEL | ||
| end subroutine omp_master_repro | ||
| end module test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions 39 llvm/test/Transforms/LoopVectorize/crash-sigfpe-zero-freq.ll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| ; Test case for crash with Floating point Exception in loop-vectorize pass | ||
| ; This test verifies that the loop vectorizer does not crash with SIGFPE | ||
| ; when processing blocks with zero block frequency. | ||
| ; See issue #172049 | ||
| | ||
| ; RUN: opt -passes=loop-vectorize -S %s | ||
| | ||
| ; ModuleID = 'reduced.ll' | ||
| source_filename = "reduced.ll" | ||
| target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:1-p2:32:8:8:32-ni:2" | ||
| target triple = "x86_64-unknown-linux-gnu" | ||
| | ||
| define ptr addrspace(1) @wombat() gc "statepoint-example" { | ||
| bb: | ||
| br label %bb2 | ||
| | ||
| bb1: | ||
| ret ptr addrspace(1) null | ||
| | ||
| bb2: | ||
| %phi = phi i64 [ %add, %bb6 ], [ 0, %bb ] | ||
| br i1 false, label %bb3, label %bb6 | ||
| | ||
| bb3: | ||
| br i1 false, label %bb4, label %bb5, !prof !0 | ||
| | ||
| bb4: | ||
| br label %bb6 | ||
| | ||
| bb5: | ||
| br label %bb6 | ||
| | ||
| bb6: | ||
| %add = add i64 %phi, 1 | ||
| %icmp = icmp eq i64 %phi, 0 | ||
| br i1 %icmp, label %bb2, label %bb1 | ||
| } | ||
| | ||
| !0 = !{!"branch_weights", i32 1, i32 0} |
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.