[PATCH] D94355: [SimplifyCFG] Add relative switch lookup tables
Gulfem Savrun Yeniceri via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 18:36:58 PST 2021
gulfem marked 2 inline comments as done.
gulfem added inline comments.
================
Comment at: llvm/test/Transforms/SimplifyCFG/ARM/switch-to-relative-lookup-table.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -simplifycfg -simplifycfg-require-and-preserve-domtree=1 -switch-to-lookup -relative-switch-lookup-table -mtriple=arm -relocation-model=pic < %s | FileCheck %s
----------------
hans wrote:
> Any reason to have tests both under ARM/ and X86/ for this?
>
> Also I'd like to see a test which shows that the transformation happens for PIC code but not for non-PIC.
> Any reason to have tests both under ARM/ and X86/ for this?
There are two existing switch-to-lookup tests one under ARM/ and one under /X86 (I don't know the original reason).
/ARM test is much simpler. I now put all the relative lookup tests under /X86.
> Also I'd like to see a test which shows that the transformation happens for PIC code but not for non-PIC.
Could you please clarify that?
Do you want to see a test that checks the code for non-PIC case when -fno-PIC is enabled?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94355/new/
https://reviews.llvm.org/D94355
More information about the llvm-commits
mailing list