Skip to content

Conversation

@eugeneepshteyn
Copy link
Contributor

@eugeneepshteyn eugeneepshteyn commented Nov 18, 2025

For SELECT CASE with character selector, instead of allways calling runtime comparison function, emit hlfir.cmpchar. This has different behaviors at different optimization levels: at -O0, it still emits flang-rt call, but at higher optimization levels it does inline comparison. Modify test/Lower/select-case-statement.f90 to test both comparison cases.

For SELECT CASE with character selector, instead of allways calling runtime
comparison function, emit hlfir.cmpchar. This has different behaviors at
different optimization levels: at -O0, it still emits flang-rt call, but
at higher optimization levels it does inline comparison.
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

🐧 Linux x64 Test Results

  • 4063 tests passed
  • 202 tests skipped

@eugeneepshteyn eugeneepshteyn marked this pull request as ready for review November 21, 2025 05:18
Copy link
Contributor

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@eugeneepshteyn eugeneepshteyn merged commit 8be4641 into llvm:main Nov 21, 2025
12 checks passed
@eugeneepshteyn eugeneepshteyn deleted the select-case-hlfir-cmpchar branch November 21, 2025 17:03
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
…mpchar (llvm#168476)

For SELECT CASE with character selector, instead of allways calling
runtime comparison function, emit hlfir.cmpchar. This has different
behaviors at different optimization levels: at -O0, it still emits
flang-rt call, but at higher optimization levels it does inline
comparison. Modify test/Lower/select-case-statement.f90 to test both
comparison cases.
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
…mpchar (llvm#168476)

For SELECT CASE with character selector, instead of allways calling
runtime comparison function, emit hlfir.cmpchar. This has different
behaviors at different optimization levels: at -O0, it still emits
flang-rt call, but at higher optimization levels it does inline
comparison. Modify test/Lower/select-case-statement.f90 to test both
comparison cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants